Skip to content

Commit

Permalink
rev-parse: make "whatchanged -- git-fetch-script" work again.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 28, 2006
1 parent 6b94f1e commit b33aba5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rev-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b33aba5

Please sign in to comment.