aboutsummaryrefslogtreecommitdiff
path: root/t/t4202-log.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2009-07-17 16:28:06 +0200
committerJunio C Hamano <gitster@pobox.com>2009-07-18 16:57:49 -0700
commitd5cee0f78654357965cb88c4e6d3cfa272d9ae28 (patch)
tree5cc86defaa1bf15fede68018ef83d808cba5531b /t/t4202-log.sh
parent3de4a44308d5c84c468f3fb69a3c3f3092eaf369 (diff)
downloadgit-d5cee0f78654357965cb88c4e6d3cfa272d9ae28.tar.gz
git-d5cee0f78654357965cb88c4e6d3cfa272d9ae28.tar.xz
t4202-log.sh: Test git log --no-walk sort order
'git log --no-walk' sorts commits by commit time whereas 'git show' does not (it leaves them as given on the command line). Document this by two tests so that we never forget why ba1d450 (Tentative built-in "git show", 2006-04-15) introduced it and 8e64006 (Teach revision machinery about --no-walk, 2007-07-24) exposed it as an option argument. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-xt/t4202-log.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index aad3894ad..48e0088b4 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -149,6 +149,26 @@ test_expect_success 'git log --follow' '
'
+cat > expect << EOF
+804a787 sixth
+394ef78 fifth
+5d31159 fourth
+EOF
+test_expect_success 'git log --no-walk <commits> sorts by commit time' '
+ git log --no-walk --oneline 5d31159 804a787 394ef78 > actual &&
+ test_cmp expect actual
+'
+
+cat > expect << EOF
+5d31159 fourth
+804a787 sixth
+394ef78 fifth
+EOF
+test_expect_success 'git show <commits> leaves list of commits as given' '
+ git show --oneline -s 5d31159 804a787 394ef78 > actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'setup case sensitivity tests' '
echo case >one &&
test_tick &&