summaryrefslogtreecommitdiff
path: root/t/t9300-fast-import.sh
diff options
context:
space:
mode:
authorDmitry Ivankov <divanorama@gmail.com>2011-08-22 18:10:19 +0600
committerJunio C Hamano <gitster@pobox.com>2011-08-23 11:25:59 -0700
commit6c447f633cedd6e2366151b0b82b1731f8c1ee1d (patch)
treeafe7d25be73db515c5257eadf026ce83b41c9f49 /t/t9300-fast-import.sh
parent2efe38e7da40fdf2b6e0261984d7adaab16ad930 (diff)
downloadgit-6c447f633cedd6e2366151b0b82b1731f8c1ee1d.tar.gz
fast-import: allow to tag newly created objects
fast-import allows to tag objects by sha1 and to query sha1 of objects being imported. So it should allow to tag these objects, make it do so. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-xt/t9300-fast-import.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 80b06f0714..ab9493478c 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -188,12 +188,32 @@ test_expect_success \
test_cmp expect marks.new'
test_tick
+new_blob=$(echo testing | git hash-object --stdin)
cat >input <<INPUT_END
tag series-A-blob-2
from $(git rev-parse refs/heads/master:file3)
data <<EOF
Tag blob by sha1.
EOF
+
+blob
+mark :6
+data <<EOF
+testing
+EOF
+
+commit refs/heads/new_blob
+committer <> 0 +0000
+data 0
+M 644 :6 new_blob
+#pretend we got sha1 from fast-import
+ls "new_blob"
+
+tag series-A-blob-3
+from $new_blob
+data <<EOF
+Tag new_blob.
+EOF
INPUT_END
cat >expect <<EOF
@@ -202,12 +222,18 @@ type blob
tag series-A-blob-2
Tag blob by sha1.
+object $new_blob
+type blob
+tag series-A-blob-3
+
+Tag new_blob.
EOF
test_expect_success \
'A: tag blob by sha1' \
'git fast-import <input &&
git cat-file tag tags/series-A-blob-2 >actual &&
+ git cat-file tag tags/series-A-blob-3 >>actual &&
test_cmp expect actual'
test_tick