Browse Source

Merge branch 'ew/rev-parse-since-test'

Test to make sure "git rev-parse one-thing one-thing" gives
the same thing twice (when one-thing is --since=X).

* ew/rev-parse-since-test:
  t1500: ensure current --since= behavior remains
maint
Junio C Hamano 4 years ago
parent
commit
e9b4c483c7
  1. 15
      t/t1500-rev-parse.sh

15
t/t1500-rev-parse.sh

@ -243,4 +243,19 @@ test_expect_success 'showing the superproject correctly' ' @@ -243,4 +243,19 @@ test_expect_success 'showing the superproject correctly' '
test_cmp expect out
'

# at least one external project depends on this behavior:
test_expect_success 'rev-parse --since= unsqueezed ordering' '
x1=--since=1970-01-01T00:00:01Z &&
x2=--since=1970-01-01T00:00:02Z &&
x3=--since=1970-01-01T00:00:03Z &&
git rev-parse $x1 $x1 $x3 $x2 >actual &&
cat >expect <<-EOF &&
--max-age=1
--max-age=1
--max-age=3
--max-age=2
EOF
test_cmp expect actual
'

test_done

Loading…
Cancel
Save