Skip to content

Commit b33aba5

Browse files
author
Junio C Hamano
committed
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>
1 parent 6b94f1e commit b33aba5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rev-parse.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ int main(int argc, char **argv)
294294
}
295295
if (verify)
296296
die("Needed a single revision");
297-
if (lstat(arg, &st) < 0)
297+
if ((filter & DO_REVS) &&
298+
(filter & DO_NONFLAGS) && /* !def && */
299+
lstat(arg, &st) < 0)
298300
die("'%s': %s", arg, strerror(errno));
299301
as_is = 1;
300302
show_file(arg);

0 commit comments

Comments
 (0)