]>
Commit | Line | Data |
---|---|---|
446c6fae RJ |
1 | #!/bin/sh |
2 | # | |
3 | # | |
4 | ||
0cb0e143 | 5 | test_description='git mktag: tag object verify test' |
446c6fae | 6 | |
b2e5d75d | 7 | TEST_PASSES_SANITIZE_LEAK=true |
446c6fae RJ |
8 | . ./test-lib.sh |
9 | ||
10 | ########################################################### | |
11 | # check the tag.sig file, expecting verify_tag() to fail, | |
12 | # and checking that the error message matches the pattern | |
13 | # given in the expect.pat file. | |
14 | ||
15 | check_verify_failure () { | |
fce3b089 ÆAB |
16 | subject=$1 && |
17 | message=$2 && | |
18 | shift 2 && | |
19 | ||
47c0cb1a ÆAB |
20 | no_strict= && |
21 | fsck_obj_ok= && | |
fce3b089 ÆAB |
22 | no_strict= && |
23 | while test $# != 0 | |
24 | do | |
25 | case "$1" in | |
26 | --no-strict) | |
27 | no_strict=yes | |
28 | ;; | |
47c0cb1a ÆAB |
29 | --fsck-obj-ok) |
30 | fsck_obj_ok=yes | |
31 | ;; | |
fce3b089 ÆAB |
32 | esac && |
33 | shift | |
34 | done && | |
35 | ||
36 | test_expect_success "fail with [--[no-]strict]: $subject" ' | |
37 | test_must_fail git mktag <tag.sig 2>err && | |
38 | if test -z "$no_strict" | |
06ce7915 | 39 | then |
fce3b089 ÆAB |
40 | test_must_fail git mktag <tag.sig 2>err2 && |
41 | test_cmp err err2 | |
6a748c2c ÆAB |
42 | else |
43 | git mktag --no-strict <tag.sig | |
06ce7915 | 44 | fi |
fce3b089 | 45 | ' |
47c0cb1a ÆAB |
46 | |
47 | test_expect_success "setup: $subject" ' | |
eddc1f55 ÆAB |
48 | tag_ref=refs/tags/bad_tag && |
49 | ||
47c0cb1a ÆAB |
50 | # Reset any leftover state from the last $subject |
51 | rm -rf bad-tag && | |
52 | ||
53 | git init --bare bad-tag && | |
eddc1f55 | 54 | bad_tag=$(git -C bad-tag hash-object -t tag -w --stdin --literally <tag.sig) |
47c0cb1a ÆAB |
55 | ' |
56 | ||
57 | test_expect_success "hash-object & fsck unreachable: $subject" ' | |
58 | if test -n "$fsck_obj_ok" | |
59 | then | |
60 | git -C bad-tag fsck | |
61 | else | |
62 | test_must_fail git -C bad-tag fsck | |
63 | fi | |
64 | ' | |
eddc1f55 ÆAB |
65 | |
66 | test_expect_success "update-ref & fsck reachable: $subject" ' | |
67 | # Make sure the earlier test created it for us | |
68 | git rev-parse "$bad_tag" && | |
69 | ||
70 | # The update-ref of the bad content will fail, do it | |
71 | # anyway to see if it segfaults | |
72 | test_might_fail git -C bad-tag update-ref "$tag_ref" "$bad_tag" && | |
73 | ||
74 | # Manually create the broken, we cannot do it with | |
75 | # update-ref | |
e9706a18 HWN |
76 | test-tool -C bad-tag ref-store main delete-refs 0 msg "$tag_ref" && |
77 | test-tool -C bad-tag ref-store main update-ref msg "$tag_ref" $bad_tag $ZERO_OID REF_SKIP_OID_VERIFICATION && | |
eddc1f55 ÆAB |
78 | |
79 | # Unlike fsck-ing unreachable content above, this | |
80 | # will always fail. | |
81 | test_must_fail git -C bad-tag fsck | |
82 | ' | |
b48015b3 ÆAB |
83 | |
84 | test_expect_success "for-each-ref: $subject" ' | |
85 | # Make sure the earlier test created it for us | |
86 | git rev-parse "$bad_tag" && | |
87 | ||
e9706a18 HWN |
88 | test-tool -C bad-tag ref-store main delete-refs 0 msg "$tag_ref" && |
89 | test-tool -C bad-tag ref-store main update-ref msg "$tag_ref" $bad_tag $ZERO_OID REF_SKIP_OID_VERIFICATION && | |
b48015b3 ÆAB |
90 | |
91 | printf "%s tag\t%s\n" "$bad_tag" "$tag_ref" >expected && | |
92 | git -C bad-tag for-each-ref "$tag_ref" >actual && | |
93 | test_cmp expected actual && | |
94 | ||
95 | test_must_fail git -C bad-tag for-each-ref --format="%(*objectname)" | |
96 | ' | |
2f61b3ee ÆAB |
97 | |
98 | test_expect_success "fast-export & fast-import: $subject" ' | |
99 | # Make sure the earlier test created it for us | |
100 | git rev-parse "$bad_tag" && | |
101 | ||
102 | test_must_fail git -C bad-tag fast-export --all && | |
103 | test_must_fail git -C bad-tag fast-export "$bad_tag" | |
104 | ' | |
446c6fae RJ |
105 | } |
106 | ||
ca9a1ed9 ÆAB |
107 | test_expect_mktag_success() { |
108 | test_expect_success "$1" ' | |
109 | git hash-object -t tag -w --stdin <tag.sig >expected && | |
110 | git fsck --strict && | |
111 | ||
112 | git mktag <tag.sig >hash && | |
113 | test_cmp expected hash && | |
114 | test_when_finished "git update-ref -d refs/tags/mytag $(cat hash)" && | |
115 | git update-ref refs/tags/mytag $(cat hash) $(test_oid zero) && | |
116 | git fsck --strict | |
117 | ' | |
118 | } | |
119 | ||
446c6fae RJ |
120 | ########################################################### |
121 | # first create a commit, so we have a valid object/type | |
122 | # for the tag. | |
4a45f7dd | 123 | test_expect_success 'setup' ' |
b5ca549c | 124 | test_commit A && |
692654dc ÆAB |
125 | test_commit B && |
126 | head=$(git rev-parse --verify HEAD) && | |
127 | head_parent=$(git rev-parse --verify HEAD~) && | |
128 | tree=$(git rev-parse HEAD^{tree}) && | |
129 | blob=$(git rev-parse --verify HEAD:B.t) | |
4a45f7dd | 130 | ' |
446c6fae | 131 | |
3f390a36 ÆAB |
132 | test_expect_success 'basic usage' ' |
133 | cat >tag.sig <<-EOF && | |
134 | object $head | |
135 | type commit | |
136 | tag mytag | |
137 | tagger T A Gger <tagger@example.com> 1206478233 -0500 | |
138 | EOF | |
139 | git mktag <tag.sig && | |
140 | git mktag --end-of-options <tag.sig && | |
141 | test_expect_code 129 git mktag --unknown-option | |
142 | ' | |
143 | ||
446c6fae RJ |
144 | ############################################################ |
145 | # 1. length check | |
146 | ||
147 | cat >tag.sig <<EOF | |
148 | too short for a tag | |
149 | EOF | |
150 | ||
e9b20943 | 151 | check_verify_failure 'Tag object length check' \ |
06ce7915 | 152 | '^error:.* missingObject:' 'strict' |
446c6fae RJ |
153 | |
154 | ############################################################ | |
155 | # 2. object line label check | |
156 | ||
157 | cat >tag.sig <<EOF | |
0d35ccb5 | 158 | xxxxxx $head |
446c6fae RJ |
159 | type tag |
160 | tag mytag | |
e0aaf781 BC |
161 | tagger . <> 0 +0000 |
162 | ||
446c6fae RJ |
163 | EOF |
164 | ||
acf9de4c | 165 | check_verify_failure '"object" line label check' '^error:.* missingObject:' |
446c6fae RJ |
166 | |
167 | ############################################################ | |
0d35ccb5 | 168 | # 3. object line hash check |
446c6fae RJ |
169 | |
170 | cat >tag.sig <<EOF | |
0d35ccb5 | 171 | object $(echo $head | tr 0-9a-f z) |
446c6fae RJ |
172 | type tag |
173 | tag mytag | |
e0aaf781 BC |
174 | tagger . <> 0 +0000 |
175 | ||
446c6fae RJ |
176 | EOF |
177 | ||
acf9de4c | 178 | check_verify_failure '"object" line check' '^error:.* badObjectSha1:' |
446c6fae RJ |
179 | |
180 | ############################################################ | |
181 | # 4. type line label check | |
182 | ||
183 | cat >tag.sig <<EOF | |
acb49d1c | 184 | object $head |
446c6fae RJ |
185 | xxxx tag |
186 | tag mytag | |
e0aaf781 BC |
187 | tagger . <> 0 +0000 |
188 | ||
446c6fae RJ |
189 | EOF |
190 | ||
acf9de4c | 191 | check_verify_failure '"type" line label check' '^error:.* missingTypeEntry:' |
446c6fae RJ |
192 | |
193 | ############################################################ | |
194 | # 5. type line eol check | |
195 | ||
acb49d1c | 196 | echo "object $head" >tag.sig |
2aad957a | 197 | printf "type tagsssssssssssssssssssssssssssssss" >>tag.sig |
446c6fae | 198 | |
acf9de4c | 199 | check_verify_failure '"type" line eol check' '^error:.* unterminatedHeader:' |
446c6fae RJ |
200 | |
201 | ############################################################ | |
202 | # 6. tag line label check #1 | |
203 | ||
204 | cat >tag.sig <<EOF | |
acb49d1c | 205 | object $head |
446c6fae RJ |
206 | type tag |
207 | xxx mytag | |
e0aaf781 BC |
208 | tagger . <> 0 +0000 |
209 | ||
446c6fae RJ |
210 | EOF |
211 | ||
e9b20943 | 212 | check_verify_failure '"tag" line label check #1' \ |
acf9de4c | 213 | '^error:.* missingTagEntry:' |
446c6fae RJ |
214 | |
215 | ############################################################ | |
216 | # 7. tag line label check #2 | |
217 | ||
218 | cat >tag.sig <<EOF | |
acb49d1c | 219 | object $head |
446c6fae RJ |
220 | type taggggggggggggggggggggggggggggggg |
221 | tag | |
222 | EOF | |
223 | ||
e9b20943 | 224 | check_verify_failure '"tag" line label check #2' \ |
acf9de4c | 225 | '^error:.* badType:' |
446c6fae RJ |
226 | |
227 | ############################################################ | |
228 | # 8. type line type-name length check | |
229 | ||
230 | cat >tag.sig <<EOF | |
acb49d1c | 231 | object $head |
446c6fae RJ |
232 | type taggggggggggggggggggggggggggggggg |
233 | tag mytag | |
234 | EOF | |
235 | ||
e9b20943 | 236 | check_verify_failure '"type" line type-name length check' \ |
acf9de4c | 237 | '^error:.* badType:' |
446c6fae RJ |
238 | |
239 | ############################################################ | |
30f882c1 | 240 | # 9. verify object (hash/type) check |
446c6fae RJ |
241 | |
242 | cat >tag.sig <<EOF | |
acb49d1c | 243 | object $(test_oid deadbeef) |
30f882c1 ÆAB |
244 | type tag |
245 | tag mytag | |
246 | tagger . <> 0 +0000 | |
247 | ||
248 | EOF | |
249 | ||
250 | check_verify_failure 'verify object (hash/type) check -- correct type, nonexisting object' \ | |
47c0cb1a ÆAB |
251 | '^fatal: could not read tagged object' \ |
252 | --fsck-obj-ok | |
30f882c1 ÆAB |
253 | |
254 | cat >tag.sig <<EOF | |
255 | object $head | |
446c6fae RJ |
256 | type tagggg |
257 | tag mytag | |
e0aaf781 BC |
258 | tagger . <> 0 +0000 |
259 | ||
446c6fae RJ |
260 | EOF |
261 | ||
30f882c1 | 262 | check_verify_failure 'verify object (hash/type) check -- made-up type, valid object' \ |
acf9de4c | 263 | '^error:.* badType:' |
30f882c1 ÆAB |
264 | |
265 | cat >tag.sig <<EOF | |
266 | object $(test_oid deadbeef) | |
267 | type tagggg | |
268 | tag mytag | |
269 | tagger . <> 0 +0000 | |
270 | ||
271 | EOF | |
272 | ||
273 | check_verify_failure 'verify object (hash/type) check -- made-up type, nonexisting object' \ | |
acf9de4c | 274 | '^error:.* badType:' |
446c6fae | 275 | |
30f882c1 ÆAB |
276 | cat >tag.sig <<EOF |
277 | object $head | |
278 | type tree | |
279 | tag mytag | |
280 | tagger . <> 0 +0000 | |
281 | ||
282 | EOF | |
283 | ||
692654dc | 284 | check_verify_failure 'verify object (hash/type) check -- mismatched type, valid object' \ |
47c0cb1a ÆAB |
285 | '^fatal: object.*tagged as.*tree.*but is.*commit' \ |
286 | --fsck-obj-ok | |
692654dc ÆAB |
287 | |
288 | ############################################################ | |
289 | # 9.5. verify object (hash/type) check -- replacement | |
290 | ||
291 | test_expect_success 'setup replacement of commit -> commit and tree -> blob' ' | |
292 | git replace $head_parent $head && | |
293 | git replace -f $tree $blob | |
294 | ' | |
295 | ||
296 | cat >tag.sig <<EOF | |
297 | object $head_parent | |
298 | type commit | |
299 | tag mytag | |
300 | tagger . <> 0 +0000 | |
301 | ||
302 | EOF | |
303 | ||
304 | test_expect_mktag_success 'tag to a commit replaced by another commit' | |
305 | ||
306 | cat >tag.sig <<EOF | |
307 | object $tree | |
308 | type tree | |
309 | tag mytag | |
310 | tagger . <> 0 +0000 | |
311 | ||
312 | EOF | |
313 | ||
30f882c1 | 314 | check_verify_failure 'verify object (hash/type) check -- mismatched type, valid object' \ |
47c0cb1a ÆAB |
315 | '^fatal: object.*tagged as.*tree.*but is.*blob' \ |
316 | --fsck-obj-ok | |
30f882c1 | 317 | |
446c6fae RJ |
318 | ############################################################ |
319 | # 10. verify tag-name check | |
320 | ||
321 | cat >tag.sig <<EOF | |
322 | object $head | |
323 | type commit | |
324 | tag my tag | |
e0aaf781 BC |
325 | tagger . <> 0 +0000 |
326 | ||
446c6fae RJ |
327 | EOF |
328 | ||
e9b20943 | 329 | check_verify_failure 'verify tag-name check' \ |
fce3b089 | 330 | '^error:.* badTagName:' \ |
47c0cb1a ÆAB |
331 | --no-strict \ |
332 | --fsck-obj-ok | |
446c6fae RJ |
333 | |
334 | ############################################################ | |
3dff5379 | 335 | # 11. tagger line label check #1 |
446c6fae RJ |
336 | |
337 | cat >tag.sig <<EOF | |
338 | object $head | |
339 | type commit | |
340 | tag mytag | |
e0aaf781 BC |
341 | |
342 | This is filler | |
446c6fae RJ |
343 | EOF |
344 | ||
e9b20943 | 345 | check_verify_failure '"tagger" line label check #1' \ |
fce3b089 | 346 | '^error:.* missingTaggerEntry:' \ |
47c0cb1a ÆAB |
347 | --no-strict \ |
348 | --fsck-obj-ok | |
446c6fae RJ |
349 | |
350 | ############################################################ | |
3dff5379 | 351 | # 12. tagger line label check #2 |
446c6fae RJ |
352 | |
353 | cat >tag.sig <<EOF | |
354 | object $head | |
355 | type commit | |
356 | tag mytag | |
357 | tagger | |
e0aaf781 BC |
358 | |
359 | This is filler | |
446c6fae RJ |
360 | EOF |
361 | ||
e9b20943 | 362 | check_verify_failure '"tagger" line label check #2' \ |
fce3b089 | 363 | '^error:.* missingTaggerEntry:' \ |
47c0cb1a ÆAB |
364 | --no-strict \ |
365 | --fsck-obj-ok | |
446c6fae RJ |
366 | |
367 | ############################################################ | |
acf9de4c | 368 | # 13. allow missing tag author name like fsck |
446c6fae RJ |
369 | |
370 | cat >tag.sig <<EOF | |
371 | object $head | |
372 | type commit | |
373 | tag mytag | |
e0aaf781 BC |
374 | tagger <> 0 +0000 |
375 | ||
376 | This is filler | |
377 | EOF | |
378 | ||
acf9de4c | 379 | test_expect_mktag_success 'allow missing tag author name' |
e0aaf781 BC |
380 | |
381 | ############################################################ | |
ba26ab99 | 382 | # 14. disallow missing tag author name |
e0aaf781 BC |
383 | |
384 | cat >tag.sig <<EOF | |
385 | object $head | |
386 | type commit | |
387 | tag mytag | |
388 | tagger T A Gger < | |
389 | > 0 +0000 | |
390 | ||
391 | EOF | |
392 | ||
ba26ab99 | 393 | check_verify_failure 'disallow malformed tagger' \ |
fce3b089 | 394 | '^error:.* badEmail:' \ |
47c0cb1a ÆAB |
395 | --no-strict \ |
396 | --fsck-obj-ok | |
e0aaf781 BC |
397 | |
398 | ############################################################ | |
399 | # 15. allow empty tag email | |
400 | ||
401 | cat >tag.sig <<EOF | |
402 | object $head | |
403 | type commit | |
404 | tag mytag | |
405 | tagger T A Gger <> 0 +0000 | |
406 | ||
407 | EOF | |
408 | ||
ca9a1ed9 | 409 | test_expect_mktag_success 'allow empty tag email' |
e0aaf781 BC |
410 | |
411 | ############################################################ | |
acf9de4c | 412 | # 16. allow spaces in tag email like fsck |
ba26ab99 BC |
413 | |
414 | cat >tag.sig <<EOF | |
415 | object $head | |
416 | type commit | |
417 | tag mytag | |
418 | tagger T A Gger <tag ger@example.com> 0 +0000 | |
419 | ||
420 | EOF | |
421 | ||
acf9de4c | 422 | test_expect_mktag_success 'allow spaces in tag email like fsck' |
ba26ab99 BC |
423 | |
424 | ############################################################ | |
425 | # 17. disallow missing tag timestamp | |
e0aaf781 | 426 | |
74f16b0c | 427 | tr '_' ' ' >tag.sig <<EOF |
e0aaf781 BC |
428 | object $head |
429 | type commit | |
430 | tag mytag | |
74f16b0c | 431 | tagger T A Gger <tagger@example.com>__ |
e0aaf781 BC |
432 | |
433 | EOF | |
434 | ||
ba26ab99 | 435 | check_verify_failure 'disallow missing tag timestamp' \ |
acf9de4c | 436 | '^error:.* badDate:' |
e0aaf781 BC |
437 | |
438 | ############################################################ | |
ba26ab99 | 439 | # 18. detect invalid tag timestamp1 |
e0aaf781 BC |
440 | |
441 | cat >tag.sig <<EOF | |
442 | object $head | |
443 | type commit | |
444 | tag mytag | |
445 | tagger T A Gger <tagger@example.com> Tue Mar 25 15:47:44 2008 | |
446 | ||
447 | EOF | |
448 | ||
ba26ab99 | 449 | check_verify_failure 'detect invalid tag timestamp1' \ |
acf9de4c | 450 | '^error:.* badDate:' |
e0aaf781 BC |
451 | |
452 | ############################################################ | |
ba26ab99 BC |
453 | # 19. detect invalid tag timestamp2 |
454 | ||
455 | cat >tag.sig <<EOF | |
456 | object $head | |
457 | type commit | |
458 | tag mytag | |
459 | tagger T A Gger <tagger@example.com> 2008-03-31T12:20:15-0500 | |
460 | ||
461 | EOF | |
462 | ||
463 | check_verify_failure 'detect invalid tag timestamp2' \ | |
acf9de4c | 464 | '^error:.* badDate:' |
ba26ab99 BC |
465 | |
466 | ############################################################ | |
467 | # 20. detect invalid tag timezone1 | |
e0aaf781 BC |
468 | |
469 | cat >tag.sig <<EOF | |
470 | object $head | |
471 | type commit | |
472 | tag mytag | |
473 | tagger T A Gger <tagger@example.com> 1206478233 GMT | |
474 | ||
475 | EOF | |
476 | ||
ba26ab99 | 477 | check_verify_failure 'detect invalid tag timezone1' \ |
acf9de4c | 478 | '^error:.* badTimezone:' |
ba26ab99 BC |
479 | |
480 | ############################################################ | |
481 | # 21. detect invalid tag timezone2 | |
482 | ||
483 | cat >tag.sig <<EOF | |
484 | object $head | |
485 | type commit | |
486 | tag mytag | |
487 | tagger T A Gger <tagger@example.com> 1206478233 + 30 | |
488 | ||
489 | EOF | |
490 | ||
491 | check_verify_failure 'detect invalid tag timezone2' \ | |
acf9de4c | 492 | '^error:.* badTimezone:' |
ba26ab99 BC |
493 | |
494 | ############################################################ | |
acf9de4c | 495 | # 22. allow invalid tag timezone3 (the maximum is -1200/+1400) |
ba26ab99 BC |
496 | |
497 | cat >tag.sig <<EOF | |
498 | object $head | |
499 | type commit | |
500 | tag mytag | |
501 | tagger T A Gger <tagger@example.com> 1206478233 -1430 | |
502 | ||
503 | EOF | |
504 | ||
acf9de4c | 505 | test_expect_mktag_success 'allow invalid tag timezone' |
e0aaf781 BC |
506 | |
507 | ############################################################ | |
ba26ab99 | 508 | # 23. detect invalid header entry |
e0aaf781 BC |
509 | |
510 | cat >tag.sig <<EOF | |
511 | object $head | |
512 | type commit | |
513 | tag mytag | |
514 | tagger T A Gger <tagger@example.com> 1206478233 -0500 | |
515 | this line should not be here | |
516 | ||
517 | EOF | |
518 | ||
519 | check_verify_failure 'detect invalid header entry' \ | |
fce3b089 | 520 | '^error:.* extraHeaderEntry:' \ |
47c0cb1a ÆAB |
521 | --no-strict \ |
522 | --fsck-obj-ok | |
e0aaf781 | 523 | |
acfc0133 ÆAB |
524 | test_expect_success 'invalid header entry config & fsck' ' |
525 | test_must_fail git mktag <tag.sig && | |
06ce7915 ÆAB |
526 | git mktag --no-strict <tag.sig && |
527 | ||
acfc0133 | 528 | test_must_fail git -c fsck.extraHeaderEntry=error mktag <tag.sig && |
06ce7915 ÆAB |
529 | test_must_fail git -c fsck.extraHeaderEntry=error mktag --no-strict <tag.sig && |
530 | ||
acfc0133 | 531 | test_must_fail git -c fsck.extraHeaderEntry=warn mktag <tag.sig && |
06ce7915 ÆAB |
532 | git -c fsck.extraHeaderEntry=warn mktag --no-strict <tag.sig && |
533 | ||
acfc0133 | 534 | git -c fsck.extraHeaderEntry=ignore mktag <tag.sig && |
06ce7915 ÆAB |
535 | git -c fsck.extraHeaderEntry=ignore mktag --no-strict <tag.sig && |
536 | ||
acfc0133 | 537 | git fsck && |
780aa0a2 | 538 | git -c fsck.extraHeaderEntry=warn fsck 2>err && |
acfc0133 | 539 | grep "warning .*extraHeaderEntry:" err && |
780aa0a2 | 540 | test_must_fail git -c fsck.extraHeaderEntry=error 2>err fsck && |
acfc0133 ÆAB |
541 | grep "error .* extraHeaderEntry:" err |
542 | ' | |
543 | ||
47c95e77 ÆAB |
544 | cat >tag.sig <<EOF |
545 | object $head | |
546 | type commit | |
547 | tag mytag | |
548 | tagger T A Gger <tagger@example.com> 1206478233 -0500 | |
549 | ||
550 | ||
551 | this line comes after an extra newline | |
552 | EOF | |
553 | ||
ca9a1ed9 | 554 | test_expect_mktag_success 'allow extra newlines at start of body' |
47c95e77 ÆAB |
555 | |
556 | cat >tag.sig <<EOF | |
557 | object $head | |
558 | type commit | |
559 | tag mytag | |
560 | tagger T A Gger <tagger@example.com> 1206478233 -0500 | |
561 | ||
562 | EOF | |
563 | ||
9a1a3a4d | 564 | test_expect_mktag_success 'allow a blank line before an empty body (1)' |
47c95e77 ÆAB |
565 | |
566 | cat >tag.sig <<EOF | |
567 | object $head | |
568 | type commit | |
569 | tag mytag | |
570 | tagger T A Gger <tagger@example.com> 1206478233 -0500 | |
571 | EOF | |
572 | ||
9a1a3a4d | 573 | test_expect_mktag_success 'allow no blank line before an empty body (2)' |
47c95e77 | 574 | |
e0aaf781 | 575 | ############################################################ |
ba26ab99 | 576 | # 24. create valid tag |
e0aaf781 BC |
577 | |
578 | cat >tag.sig <<EOF | |
579 | object $head | |
580 | type commit | |
581 | tag mytag | |
582 | tagger T A Gger <tagger@example.com> 1206478233 -0500 | |
446c6fae RJ |
583 | EOF |
584 | ||
ca9a1ed9 | 585 | test_expect_mktag_success 'create valid tag object' |
446c6fae RJ |
586 | |
587 | test_done |