Skip to content

Commit

Permalink
show: fix "range implies walking"
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jun 19, 2012
1 parent b0082b9 commit c5941f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions builtin/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,9 @@ int cmd_show(int argc, const char **argv, const char *prefix)
opt.tweak = show_rev_tweak_rev;
cmd_log_init(argc, argv, prefix, &rev, &opt);

if (!rev.no_walk)
return cmd_log_walk(&rev);

count = rev.pending.nr;
objects = rev.pending.objects;
for (i = 0; i < count && !ret; i++) {
Expand Down
4 changes: 2 additions & 2 deletions t/t7007-show.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test_expect_success 'showing a range walks (Y shape, ^ first)' '
test_cmp expect actual.filtered
'

test_expect_failure 'showing a range walks (Y shape, ^ last)' '
test_expect_success 'showing a range walks (Y shape, ^ last)' '
cat >expect <<-EOF &&
commit $(git rev-parse main3)
commit $(git rev-parse main2)
Expand Down Expand Up @@ -98,7 +98,7 @@ test_expect_success 'showing annotated tag plus commit' '
test_cmp expect actual.filtered
'

test_expect_failure 'showing range' '
test_expect_success 'showing range' '
cat >expect <<-EOF &&
commit $(git rev-parse main3)
commit $(git rev-parse main2)
Expand Down

0 comments on commit c5941f1

Please sign in to comment.