зеркало из https://github.com/microsoft/git.git
show: fix "range implies walking"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
b0082b9d59
Коммит
c5941f1aac
|
@ -451,6 +451,9 @@ int cmd_show(int argc, const char **argv, const char *prefix)
|
||||||
opt.tweak = show_rev_tweak_rev;
|
opt.tweak = show_rev_tweak_rev;
|
||||||
cmd_log_init(argc, argv, prefix, &rev, &opt);
|
cmd_log_init(argc, argv, prefix, &rev, &opt);
|
||||||
|
|
||||||
|
if (!rev.no_walk)
|
||||||
|
return cmd_log_walk(&rev);
|
||||||
|
|
||||||
count = rev.pending.nr;
|
count = rev.pending.nr;
|
||||||
objects = rev.pending.objects;
|
objects = rev.pending.objects;
|
||||||
for (i = 0; i < count && !ret; i++) {
|
for (i = 0; i < count && !ret; i++) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ test_expect_success 'showing a range walks (Y shape, ^ first)' '
|
||||||
test_cmp expect actual.filtered
|
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 &&
|
cat >expect <<-EOF &&
|
||||||
commit $(git rev-parse main3)
|
commit $(git rev-parse main3)
|
||||||
commit $(git rev-parse main2)
|
commit $(git rev-parse main2)
|
||||||
|
@ -98,7 +98,7 @@ test_expect_success 'showing annotated tag plus commit' '
|
||||||
test_cmp expect actual.filtered
|
test_cmp expect actual.filtered
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_failure 'showing range' '
|
test_expect_success 'showing range' '
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-EOF &&
|
||||||
commit $(git rev-parse main3)
|
commit $(git rev-parse main3)
|
||||||
commit $(git rev-parse main2)
|
commit $(git rev-parse main2)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче