Skip to content

Commit a65f200

Browse files
committed
Make "git-log --" without paths behave the same as "git-log" without --
"git log" family of commands, even when run from a subdirectory, do not limit the revision range with the current directory as the path limiter, but with double-dash without any paths after it, i.e. "git log --" do so. It was a mistake to have a difference between "git log --" and "git log" introduced in commit ae56354 (First cut at libifying revlist generation). Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 75d2449 commit a65f200

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

revision.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
896896
continue;
897897
argv[i] = NULL;
898898
argc = i;
899-
revs->prune_data = get_pathspec(revs->prefix, argv + i + 1);
899+
if (argv[i + 1])
900+
revs->prune_data = get_pathspec(revs->prefix, argv + i + 1);
900901
seen_dashdash = 1;
901902
break;
902903
}

0 commit comments

Comments
 (0)