@@ -7,65 +7,59 @@ test_description='fmt-merge-msg test'
7
7
8
8
. ./test-lib.sh
9
9
10
- datestamp=1151939923
11
- setdate () {
12
- GIT_COMMITTER_DATE=" $datestamp +0200"
13
- GIT_AUTHOR_DATE=" $datestamp +0200"
14
- datestamp=` expr " $datestamp " + 1`
15
- export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
16
- }
17
-
18
10
test_expect_success setup '
19
11
echo one >one &&
20
12
git add one &&
21
- setdate &&
13
+ test_tick &&
22
14
git commit -m "Initial" &&
23
15
24
16
git clone . remote &&
25
17
26
18
echo uno >one &&
27
19
echo dos >two &&
28
20
git add two &&
29
- setdate &&
21
+ test_tick &&
30
22
git commit -a -m "Second" &&
31
23
32
24
git checkout -b left &&
33
25
34
- echo $datestamp >one &&
35
- setdate &&
26
+ echo "c1" >one &&
27
+ test_tick &&
36
28
git commit -a -m "Common #1" &&
37
29
38
- echo $datestamp >one &&
39
- setdate &&
30
+ echo "c2" >one &&
31
+ test_tick &&
40
32
git commit -a -m "Common #2" &&
41
33
42
34
git branch right &&
43
35
44
- echo $datestamp >two &&
45
- setdate &&
36
+ echo "l3" >two &&
37
+ test_tick &&
46
38
git commit -a -m "Left #3" &&
47
39
48
- echo $datestamp >two &&
49
- setdate &&
40
+ echo "l4" >two &&
41
+ test_tick &&
50
42
git commit -a -m "Left #4" &&
51
43
52
- echo $datestamp >two &&
53
- setdate &&
44
+ echo "l5" >two &&
45
+ test_tick &&
54
46
git commit -a -m "Left #5" &&
47
+ git tag tag-l5 &&
55
48
56
49
git checkout right &&
57
50
58
- echo $datestamp >three &&
51
+ echo "r3" >three &&
59
52
git add three &&
60
- setdate &&
53
+ test_tick &&
61
54
git commit -a -m "Right #3" &&
55
+ git tag tag-r3 &&
62
56
63
- echo $datestamp >three &&
64
- setdate &&
57
+ echo "r4" >three &&
58
+ test_tick &&
65
59
git commit -a -m "Right #4" &&
66
60
67
- echo $datestamp >three &&
68
- setdate &&
61
+ echo "r5" >three &&
62
+ test_tick &&
69
63
git commit -a -m "Right #5" &&
70
64
71
65
git show-branch
@@ -115,7 +109,7 @@ test_expect_success 'merge-msg test #3-1' '
115
109
git config merge.log true &&
116
110
117
111
git checkout master &&
118
- setdate &&
112
+ test_tick &&
119
113
git fetch . left &&
120
114
121
115
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -129,7 +123,7 @@ test_expect_success 'merge-msg test #3-2' '
129
123
git config merge.summary true &&
130
124
131
125
git checkout master &&
132
- setdate &&
126
+ test_tick &&
133
127
git fetch . left &&
134
128
135
129
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -161,7 +155,7 @@ test_expect_success 'merge-msg test #4-1' '
161
155
git config merge.log true &&
162
156
163
157
git checkout master &&
164
- setdate &&
158
+ test_tick &&
165
159
git fetch . left right &&
166
160
167
161
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -175,7 +169,7 @@ test_expect_success 'merge-msg test #4-2' '
175
169
git config merge.summary true &&
176
170
177
171
git checkout master &&
178
- setdate &&
172
+ test_tick &&
179
173
git fetch . left right &&
180
174
181
175
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -189,7 +183,7 @@ test_expect_success 'merge-msg test #5-1' '
189
183
git config merge.log yes &&
190
184
191
185
git checkout master &&
192
- setdate &&
186
+ test_tick &&
193
187
git fetch . left right &&
194
188
195
189
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -203,7 +197,7 @@ test_expect_success 'merge-msg test #5-2' '
203
197
git config merge.summary yes &&
204
198
205
199
git checkout master &&
206
- setdate &&
200
+ test_tick &&
207
201
git fetch . left right &&
208
202
209
203
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
@@ -217,7 +211,7 @@ test_expect_success 'merge-msg -F' '
217
211
git config merge.summary yes &&
218
212
219
213
git checkout master &&
220
- setdate &&
214
+ test_tick &&
221
215
git fetch . left right &&
222
216
223
217
git fmt-merge-msg -F .git/FETCH_HEAD >actual &&
@@ -231,7 +225,7 @@ test_expect_success 'merge-msg -F in subdirectory' '
231
225
git config merge.summary yes &&
232
226
233
227
git checkout master &&
234
- setdate &&
228
+ test_tick &&
235
229
git fetch . left right &&
236
230
mkdir sub &&
237
231
cp .git/FETCH_HEAD sub/FETCH_HEAD &&
@@ -251,7 +245,7 @@ test_expect_success 'merge-msg with nothing to merge' '
251
245
(
252
246
cd remote &&
253
247
git checkout -b unrelated &&
254
- setdate &&
248
+ test_tick &&
255
249
git fetch origin &&
256
250
git fmt-merge-msg <.git/FETCH_HEAD >../actual
257
251
) &&
0 commit comments