Skip to content

Commit c5941f1

Browse files
committed
show: fix "range implies walking"
Signed-off-by: Junio C Hamano <[email protected]>
1 parent b0082b9 commit c5941f1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

builtin/log.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,9 @@ int cmd_show(int argc, const char **argv, const char *prefix)
451451
opt.tweak = show_rev_tweak_rev;
452452
cmd_log_init(argc, argv, prefix, &rev, &opt);
453453

454+
if (!rev.no_walk)
455+
return cmd_log_walk(&rev);
456+
454457
count = rev.pending.nr;
455458
objects = rev.pending.objects;
456459
for (i = 0; i < count && !ret; i++) {

t/t7007-show.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test_expect_success 'showing a range walks (Y shape, ^ first)' '
5757
test_cmp expect actual.filtered
5858
'
5959

60-
test_expect_failure 'showing a range walks (Y shape, ^ last)' '
60+
test_expect_success 'showing a range walks (Y shape, ^ last)' '
6161
cat >expect <<-EOF &&
6262
commit $(git rev-parse main3)
6363
commit $(git rev-parse main2)
@@ -98,7 +98,7 @@ test_expect_success 'showing annotated tag plus commit' '
9898
test_cmp expect actual.filtered
9999
'
100100

101-
test_expect_failure 'showing range' '
101+
test_expect_success 'showing range' '
102102
cat >expect <<-EOF &&
103103
commit $(git rev-parse main3)
104104
commit $(git rev-parse main2)

0 commit comments

Comments
 (0)