summaryrefslogtreecommitdiff
path: root/t/t1500-rev-parse.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-02-17 17:21:42 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-17 17:21:42 -0800
commite9b4c483c7052c1b422edb3569ff198fb2bfff46 (patch)
treeb25fe015c427bc63d1e99b03ac2b36accb678e95 /t/t1500-rev-parse.sh
parentMerge branch 'ds/maintenance-pack-refs' (diff)
parentt1500: ensure current --since= behavior remains (diff)
downloadtgif-e9b4c483c7052c1b422edb3569ff198fb2bfff46.tar.xz
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
Diffstat (limited to 't/t1500-rev-parse.sh')
-rwxr-xr-xt/t1500-rev-parse.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t1500-rev-parse.sh b/t/t1500-rev-parse.sh
index abdda360d5..deae916707 100755
--- a/t/t1500-rev-parse.sh
+++ b/t/t1500-rev-parse.sh
@@ -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