From: Junio C Hamano Date: Tue, 10 May 2011 19:07:12 +0000 (-0700) Subject: pathspec: drop "lone : means no pathspec" from get_pathspec() X-Git-Tag: v1.7.6-rc0~44^2~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b060ce7de42b357af013909039da3f08a68f3c0b;p=git.git pathspec: drop "lone : means no pathspec" from get_pathspec() We may want to give the pathspec subsystem such a feature, but not while we are still using get_pathspec() that returns a stupid "char **" that loses subtle nuances that existed in the input string. In the meantime, the callers of get_pathspec() that want to support it could do an equivalent before feeding their argv[] to the function themselves quite easily. Signed-off-by: Junio C Hamano --- diff --git a/setup.c b/setup.c index 5048252d7..84f71d5ee 100644 --- a/setup.c +++ b/setup.c @@ -197,9 +197,6 @@ const char *prefix_pathspec(const char *prefix, int prefixlen, const char *elt) } if (*copyfrom == ')') copyfrom++; - } else if (!elt[1]) { - /* Just ':' -- no element! */ - return NULL; } else { /* shorthand */ for (copyfrom = elt + 1;