Skip to content

Commit

Permalink
Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Mar 7, 2008
1 parent 971dfa1 commit 6c53e7a
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions builtin-add.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6c53e7a

Please sign in to comment.