File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -5765,7 +5765,7 @@ sub cmd_show_log {
57655765 my (@k , $c , $d , $stat );
57665766 my $esc_color = qr / (?:\033\[ (?:(?:\d +;)*\d *)?m)*/ ;
57675767 while (<$log >) {
5768- if (/ ^${esc_color} commit (- )?($: :sha1_short)/o ) {
5768+ if (/ ^${esc_color} commit (?: - )?($: :sha1_short)/o ) {
57695769 my $cmt = $1 ;
57705770 if ($c && cmt_showable($c ) && $c -> {r } != $r_last ) {
57715771 $r_last = $c -> {r };
Original file line number Diff line number Diff line change @@ -60,6 +60,21 @@ test_expect_success 'test ascending revision range' "
6060 git svn log -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 -
6161 "
6262
63+ test_expect_success ' test ascending revision range with --show-commit' "
64+ git reset --hard trunk &&
65+ git svn log --show-commit -r 1:4 | grep '^r[0-9]' | cut -d'|' -f1 | test_cmp expected-range-r1-r2-r4 -
66+ "
67+
68+ test_expect_success ' test ascending revision range with --show-commit (sha1)' "
69+ git svn find-rev r1 >expected-range-r1-r2-r4-sha1 &&
70+ git svn find-rev r2 >>expected-range-r1-r2-r4-sha1 &&
71+ git svn find-rev r4 >>expected-range-r1-r2-r4-sha1 &&
72+ git reset --hard trunk &&
73+ git svn log --show-commit -r 1:4 | grep '^r[0-9]' | cut -d'|' -f2 >out &&
74+ git rev-parse \$ (cat out) >actual &&
75+ test_cmp expected-range-r1-r2-r4-sha1 actual
76+ "
77+
6378printf ' r4 \nr2 \nr1 \n' > expected-range-r4-r2-r1
6479
6580test_expect_success ' test descending revision range' "
You can’t perform that action at this time.
0 commit comments