@matheusbsbs / matheus-bagliano / commits / 6c53e7ac04
Fork 0

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>

Junio C Hamano committed Mar 6, 2008 at 23:31 UTC 6c53e7ac04ecdb8b2697aea4bb9bec8715209e68
1 file changed -12
builtin-add.c
-12
@@ -228,18 +228,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
228 goto finish;
229 }
230
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 -
231 fill_directory(&dir, pathspec, ignored_too);
232
233 if (show_only) {