[PATCH 3/4] Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 builtin-add.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/builtin-add.c b/builtin-add.c
index 820110e..4a91e3e 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) {
-- 
1.5.4.3.587.g0bdd73

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux