git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/5] t6003: add --date-order test

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 21, 2013, 18:49 UTC
Message-ID
<1371840579-20161-4-git-send-email-gitster@pobox.com>
In-Reply-To
<1371840579-20161-1-git-send-email-gitster@pobox.com>

The "--date-order" output is a slight twist of "--topo-order" in that commits from parallel histories are shown in their committer date order without an attempt to clump commits from a single line of history together like --topo-order does.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t6003-rev-list-topo-order.sh | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh
index bb66b8b..0e3b7e1 100755
--- a/t/t6003-rev-list-topo-order.sh
+++ b/t/t6003-rev-list-topo-order.sh
@@ -100,6 +100,28 @@ l0
 root
 EOF
 
+test_output_expect_success 'simple date order' 'git rev-list --date-order  HEAD' <<EOF
+l5
+l4
+l3
+a4
+b4
+a3
+a2
+c3
+c2
+b3
+b2
+c1
+b1
+a1
+a0
+l2
+l1
+l0
+root
+EOF
+
 test_output_expect_success 'two diamonds topo order (g6)' 'git rev-list --topo-order  g4' <<EOF
 g4
 h2
-- 
1.8.3.1-682-g924db96
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 6 in “"log --author-date-order" follow-up”
  1. 0/5 "log --author-date-order" follow-upJunio C Hamano, Jun 21, 2013
  2. 1/5 t/lib-t6000: style fixesJunio C Hamano, Jun 21, 2013
  3. 2/5 topology tests: teach a helper to take abbreviated timestampsJunio C Hamano, Jun 21, 2013
  4. 3/5 t6003: add --date-order testJunio C Hamano, Jun 21, 2013
  5. 4/5 topology tests: teach a helper to set author dates as wellJunio C Hamano, Jun 21, 2013
  6. 5/5 t6003: add --author-date-order testJunio C Hamano, Jun 21, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.