提交 6c53e7ac 编写于 作者: J Junio C Hamano

Revert part of 1abf0950 (git-add: adjust to the get_pathspec() changes)

When get_pathspec() was originally made absolute-path capable,
we botched the interface to it, without dying inside the function
when given a path that is outside the work tree, and made it the
responsibility of callers to check the condition in a roundabout
way.  This is made unnecessary with the previous patch.
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 971dfa19
......@@ -228,18 +228,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
goto finish;
}
if (*argv) {
/* Was there an invalid path? */
if (pathspec) {
int num;
for (num = 0; pathspec[num]; num++)
; /* just counting */
if (argc != num)
exit(1); /* error message already given */
} else
exit(1); /* error message already given */
}
fill_directory(&dir, pathspec, ignored_too);
if (show_only) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册