t6200: modernize with test_tick

This test defines its own version of test_tick. Get rid of it.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stephen Boyd 2010-03-24 00:15:59 -07:00 committed by Junio C Hamano
parent 419fe5bc86
commit 6183a6adf1

View file

@ -7,18 +7,10 @@ test_description='fmt-merge-msg test'
. ./test-lib.sh . ./test-lib.sh
datestamp=1151939923
setdate () {
GIT_COMMITTER_DATE="$datestamp +0200"
GIT_AUTHOR_DATE="$datestamp +0200"
datestamp=`expr "$datestamp" + 1`
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
}
test_expect_success setup ' test_expect_success setup '
echo one >one && echo one >one &&
git add one && git add one &&
setdate && test_tick &&
git commit -m "Initial" && git commit -m "Initial" &&
git clone . remote && git clone . remote &&
@ -26,46 +18,48 @@ test_expect_success setup '
echo uno >one && echo uno >one &&
echo dos >two && echo dos >two &&
git add two && git add two &&
setdate && test_tick &&
git commit -a -m "Second" && git commit -a -m "Second" &&
git checkout -b left && git checkout -b left &&
echo $datestamp >one && echo "c1" >one &&
setdate && test_tick &&
git commit -a -m "Common #1" && git commit -a -m "Common #1" &&
echo $datestamp >one && echo "c2" >one &&
setdate && test_tick &&
git commit -a -m "Common #2" && git commit -a -m "Common #2" &&
git branch right && git branch right &&
echo $datestamp >two && echo "l3" >two &&
setdate && test_tick &&
git commit -a -m "Left #3" && git commit -a -m "Left #3" &&
echo $datestamp >two && echo "l4" >two &&
setdate && test_tick &&
git commit -a -m "Left #4" && git commit -a -m "Left #4" &&
echo $datestamp >two && echo "l5" >two &&
setdate && test_tick &&
git commit -a -m "Left #5" && git commit -a -m "Left #5" &&
git tag tag-l5 &&
git checkout right && git checkout right &&
echo $datestamp >three && echo "r3" >three &&
git add three && git add three &&
setdate && test_tick &&
git commit -a -m "Right #3" && git commit -a -m "Right #3" &&
git tag tag-r3 &&
echo $datestamp >three && echo "r4" >three &&
setdate && test_tick &&
git commit -a -m "Right #4" && git commit -a -m "Right #4" &&
echo $datestamp >three && echo "r5" >three &&
setdate && test_tick &&
git commit -a -m "Right #5" && git commit -a -m "Right #5" &&
git show-branch git show-branch
@ -115,7 +109,7 @@ test_expect_success 'merge-msg test #3-1' '
git config merge.log true && git config merge.log true &&
git checkout master && git checkout master &&
setdate && test_tick &&
git fetch . left && git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual && git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@ -129,7 +123,7 @@ test_expect_success 'merge-msg test #3-2' '
git config merge.summary true && git config merge.summary true &&
git checkout master && git checkout master &&
setdate && test_tick &&
git fetch . left && git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual && git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@ -161,7 +155,7 @@ test_expect_success 'merge-msg test #4-1' '
git config merge.log true && git config merge.log true &&
git checkout master && git checkout master &&
setdate && test_tick &&
git fetch . left right && git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual && git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@ -175,7 +169,7 @@ test_expect_success 'merge-msg test #4-2' '
git config merge.summary true && git config merge.summary true &&
git checkout master && git checkout master &&
setdate && test_tick &&
git fetch . left right && git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual && git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@ -189,7 +183,7 @@ test_expect_success 'merge-msg test #5-1' '
git config merge.log yes && git config merge.log yes &&
git checkout master && git checkout master &&
setdate && test_tick &&
git fetch . left right && git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual && git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@ -203,7 +197,7 @@ test_expect_success 'merge-msg test #5-2' '
git config merge.summary yes && git config merge.summary yes &&
git checkout master && git checkout master &&
setdate && test_tick &&
git fetch . left right && git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual && git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@ -217,7 +211,7 @@ test_expect_success 'merge-msg -F' '
git config merge.summary yes && git config merge.summary yes &&
git checkout master && git checkout master &&
setdate && test_tick &&
git fetch . left right && git fetch . left right &&
git fmt-merge-msg -F .git/FETCH_HEAD >actual && git fmt-merge-msg -F .git/FETCH_HEAD >actual &&
@ -231,7 +225,7 @@ test_expect_success 'merge-msg -F in subdirectory' '
git config merge.summary yes && git config merge.summary yes &&
git checkout master && git checkout master &&
setdate && test_tick &&
git fetch . left right && git fetch . left right &&
mkdir sub && mkdir sub &&
cp .git/FETCH_HEAD sub/FETCH_HEAD && cp .git/FETCH_HEAD sub/FETCH_HEAD &&
@ -251,7 +245,7 @@ test_expect_success 'merge-msg with nothing to merge' '
( (
cd remote && cd remote &&
git checkout -b unrelated && git checkout -b unrelated &&
setdate && test_tick &&
git fetch origin && git fetch origin &&
git fmt-merge-msg <.git/FETCH_HEAD >../actual git fmt-merge-msg <.git/FETCH_HEAD >../actual
) && ) &&