summaryrefslogtreecommitdiff
path: root/t/t1500-rev-parse.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-18 01:21:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-18 01:21:42 (GMT)
commite9b4c483c7052c1b422edb3569ff198fb2bfff46 (patch)
treeb25fe015c427bc63d1e99b03ac2b36accb678e95 /t/t1500-rev-parse.sh
parentd494433d26bf955091bd3221d30d6ac85272fc72 (diff)
parenta5cdca452052e824c9f3f7cf78385fbec5bb1976 (diff)
downloadgit-e9b4c483c7052c1b422edb3569ff198fb2bfff46.zip
git-e9b4c483c7052c1b422edb3569ff198fb2bfff46.tar.gz
git-e9b4c483c7052c1b422edb3569ff198fb2bfff46.tar.bz2
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 abdda36..deae916 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