@@ -94,6 +94,12 @@ data <<EOF
9494An annotated tag without a tagger
9595EOF
9696
97+ tag series-A-blob
98+ from :3
99+ data <<EOF
100+ An annotated tag that annotates a blob.
101+ EOF
102+
97103INPUT_END
98104test_expect_success \
99105 ' A: create pack from stdin' \
@@ -151,6 +157,18 @@ test_expect_success 'A: verify tag/series-A' '
151157 test_cmp expect actual
152158'
153159
160+ cat > expect << EOF
161+ object $( git rev-parse refs/heads/master:file3)
162+ type blob
163+ tag series-A-blob
164+
165+ An annotated tag that annotates a blob.
166+ EOF
167+ test_expect_success ' A: verify tag/series-A-blob' '
168+ git cat-file tag tags/series-A-blob >actual &&
169+ test_cmp expect actual
170+ '
171+
154172cat > expect << EOF
155173:2 ` git rev-parse --verify master:file2`
156174:3 ` git rev-parse --verify master:file3`
@@ -169,6 +187,55 @@ test_expect_success \
169187 </dev/null &&
170188 test_cmp expect marks.new'
171189
190+ test_tick
191+ new_blob=$( echo testing | git hash-object --stdin)
192+ cat > input << INPUT_END
193+ tag series-A-blob-2
194+ from $( git rev-parse refs/heads/master:file3)
195+ data <<EOF
196+ Tag blob by sha1.
197+ EOF
198+
199+ blob
200+ mark :6
201+ data <<EOF
202+ testing
203+ EOF
204+
205+ commit refs/heads/new_blob
206+ committer <> 0 +0000
207+ data 0
208+ M 644 :6 new_blob
209+ #pretend we got sha1 from fast-import
210+ ls "new_blob"
211+
212+ tag series-A-blob-3
213+ from $new_blob
214+ data <<EOF
215+ Tag new_blob.
216+ EOF
217+ INPUT_END
218+
219+ cat > expect << EOF
220+ object $( git rev-parse refs/heads/master:file3)
221+ type blob
222+ tag series-A-blob-2
223+
224+ Tag blob by sha1.
225+ object $new_blob
226+ type blob
227+ tag series-A-blob-3
228+
229+ Tag new_blob.
230+ EOF
231+
232+ test_expect_success \
233+ ' A: tag blob by sha1' \
234+ ' git fast-import <input &&
235+ git cat-file tag tags/series-A-blob-2 >actual &&
236+ git cat-file tag tags/series-A-blob-3 >>actual &&
237+ test_cmp expect actual'
238+
172239test_tick
173240cat > input << INPUT_END
174241commit refs/heads/verify--import-marks
0 commit comments