Skip to content

Commit 6c53e7a

Browse files
committed
Revert part of 1abf095 (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: Junio C Hamano <gitster@pobox.com>
1 parent 971dfa1 commit 6c53e7a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

builtin-add.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -228,18 +228,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
228228
goto finish;
229229
}
230230

231-
if (*argv) {
232-
/* Was there an invalid path? */
233-
if (pathspec) {
234-
int num;
235-
for (num = 0; pathspec[num]; num++)
236-
; /* just counting */
237-
if (argc != num)
238-
exit(1); /* error message already given */
239-
} else
240-
exit(1); /* error message already given */
241-
}
242-
243231
fill_directory(&dir, pathspec, ignored_too);
244232

245233
if (show_only) {

0 commit comments

Comments
 (0)