diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-21 11:08:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-21 11:16:31 -0700 |
commit | aff2e7c0677d882690213d7ddea4a868f8b18325 (patch) | |
tree | 4fa951af039fdcad298f686d68f2a83eda570861 | |
parent | topology tests: teach a helper to set author dates as well (diff) | |
download | tgif-aff2e7c0677d882690213d7ddea4a868f8b18325.tar.xz |
t6003: add --author-date-order test
Tweak the --topo/date-order test vector a bit and mark the author
dates of two commits (a2 and a3) earlier than their own committer
dates, making them much older than other commits that are made on
parallel branches to simulate the case where a long running topic
was rebased recently.
They will show up as recent in the --date-order output due to their
timestamps, but they appear a lot later in the --author-date-order
output, even though their committer timestamp says otherwise.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t6003-rev-list-topo-order.sh | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh index 77bf2ca1e1..24d1836f41 100755 --- a/t/t6003-rev-list-topo-order.sh +++ b/t/t6003-rev-list-topo-order.sh @@ -28,8 +28,8 @@ on_dates "00:08" "00:08" as_author foobar@example.com save_tag b2 unique_commit on_dates "00:09" "00:09" save_tag b3 unique_commit b3 tree -p b2 on_dates "00:10" "00:10" save_tag c2 unique_commit c2 tree -p c1 -p b2 on_dates "00:11" "00:11" save_tag c3 unique_commit c3 tree -p c2 -on_dates "00:12" "00:12" save_tag a2 unique_commit a2 tree -p a1 -on_dates "00:13" "00:13" save_tag a3 unique_commit a3 tree -p a2 +on_dates "00:12" "00:00" save_tag a2 unique_commit a2 tree -p a1 +on_dates "00:13" "00:01" save_tag a3 unique_commit a3 tree -p a2 on_dates "00:14" "00:14" save_tag b4 unique_commit b4 tree -p b3 -p a3 on_dates "00:15" "00:15" save_tag a4 unique_commit a4 tree -p a3 -p b4 -p c3 on_dates "00:16" "00:16" save_tag l3 unique_commit l3 tree -p a4 @@ -122,6 +122,28 @@ l0 root EOF +test_output_expect_success 'simple author-date order' 'git rev-list --author-date-order HEAD' <<EOF +l5 +l4 +l3 +a4 +b4 +c3 +c2 +b3 +b2 +c1 +b1 +a3 +a2 +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 |