summaryrefslogtreecommitdiff
path: root/rev-parse.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-27 01:24:52 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-28 08:09:58 (GMT)
commitb33aba518456bee97bde1fef4fe17ab6bf401bbe (patch)
tree79a6de36d5e877bd7b539cdc29f1e2356123cb98 /rev-parse.c
parent6b94f1e404afc552e5139c4357331843f5be61ad (diff)
downloadgit-b33aba518456bee97bde1fef4fe17ab6bf401bbe.zip
git-b33aba518456bee97bde1fef4fe17ab6bf401bbe.tar.gz
git-b33aba518456bee97bde1fef4fe17ab6bf401bbe.tar.bz2
rev-parse: make "whatchanged -- git-fetch-script" work again.
The latest update to avoid misspelled revs interfered when we were not interested in parsing non flags or arguments not meant for rev-list. This makes these two forms work again: git whatchanged -- git-fetch-script We could enable "!def" in the part this change touches to make the above work without '--', but then it would cause misspelled v2.6.14..v2.6.16 to be given to diff-tree and defeats the whole point of the previous fix. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'rev-parse.c')
-rw-r--r--rev-parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rev-parse.c b/rev-parse.c
index 7abad35..9567b0f 100644
--- a/rev-parse.c
+++ b/rev-parse.c
@@ -294,7 +294,9 @@ int main(int argc, char **argv)
}
if (verify)
die("Needed a single revision");
- if (lstat(arg, &st) < 0)
+ if ((filter & DO_REVS) &&
+ (filter & DO_NONFLAGS) && /* !def && */
+ lstat(arg, &st) < 0)
die("'%s': %s", arg, strerror(errno));
as_is = 1;
show_file(arg);