From c5941f1aac071addc1c9b0781c323b588c542420 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 19 Jun 2012 14:15:57 -0700 Subject: [PATCH] show: fix "range implies walking" Signed-off-by: Junio C Hamano --- builtin/log.c | 3 +++ t/t7007-show.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 56bc555d1..9ea2eb7bb 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -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++) { diff --git a/t/t7007-show.sh b/t/t7007-show.sh index 891b143e0..a40cd3630 100755 --- a/t/t7007-show.sh +++ b/t/t7007-show.sh @@ -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) @@ -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) -- 2.26.2