From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Paolo Bonzini <bonzini@gnu.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] t4202-log.sh: Test git log --no-walk sort order
Date: Tue, 14 Jul 2009 14:08:07 +0200 [thread overview]
Message-ID: <1247573287-9526-1-git-send-email-git@drmicha.warpmail.net> (raw)
In-Reply-To: <alpine.DEB.1.00.0907141243410.3155@pacific.mpi-cbg.de>
'git log --no-walk' sorts commits by commit time whereas 'git show' does
not. 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>
---
Not much to add here, besides the fact that the actual test target
should justify testing log as well as show here.
Based off master.
t/t4202-log.sh | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index aad3894..10ad5d2 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -149,6 +149,29 @@ 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
+ein
+804a787 sixth
+a/two
+394ef78 fifth
+a/two
+EOF
+test_expect_success 'git show <commits> does not sort by commit time' '
+ git show --oneline --name-only 5d31159 804a787 394ef78 > actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'setup case sensitivity tests' '
echo case >one &&
test_tick &&
--
1.6.3.3.483.g4f5e
next prev parent reply other threads:[~2009-07-14 12:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 21:41 Make 'git show' more useful Linus Torvalds
2009-07-13 22:11 ` Junio C Hamano
2009-07-13 23:43 ` [PATCH] " Paolo Bonzini
2009-07-14 0:00 ` Linus Torvalds
2009-07-14 1:25 ` Johannes Schindelin
2009-07-14 1:47 ` Linus Torvalds
2009-07-14 6:25 ` Paolo Bonzini
2009-07-14 10:44 ` Johannes Schindelin
2009-07-14 12:08 ` Michael J Gruber [this message]
2009-07-14 12:21 ` [PATCH] t4202-log.sh: Test git log --no-walk sort order Johannes Sixt
2009-07-14 12:38 ` Michael J Gruber
2009-07-14 12:45 ` [PATCHv2] " Michael J Gruber
2009-07-14 14:13 ` Johannes Schindelin
2009-07-14 14:28 ` Michael J Gruber
2009-07-17 14:28 ` [PATCH] " Michael J Gruber
2009-07-17 14:53 ` Johannes Schindelin
2009-07-13 23:42 ` Make 'git show' more useful Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1247573287-9526-1-git-send-email-git@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=bonzini@gnu.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).