aboutsummaryrefslogtreecommitdiff
path: root/builtin-add.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-06 23:31:29 -0800
committerJunio C Hamano <gitster@pobox.com>2008-03-07 00:14:43 -0800
commit6c53e7ac04ecdb8b2697aea4bb9bec8715209e68 (patch)
tree008d472266c87dd000b8025bbea5ef2af4514b67 /builtin-add.c
parent971dfa19598324f49bd3a010ca629c91d6a0f758 (diff)
downloadgit-6c53e7ac04ecdb8b2697aea4bb9bec8715209e68.tar.gz
git-6c53e7ac04ecdb8b2697aea4bb9bec8715209e68.tar.xz
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>
Diffstat (limited to 'builtin-add.c')
-rw-r--r--builtin-add.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/builtin-add.c b/builtin-add.c
index 820110e08..4a91e3eb1 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -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) {