diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-10-15 04:48:00 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-15 04:48:00 (GMT) |
commit | 16d9d7184bbf39e8c1c9c4756805278f530be30f (patch) | |
tree | afd37dd3c8734d1488e58b8da1b575b3d0de6034 /t/t9300-fast-import.sh | |
parent | 6d5291be450594d453759650f466174f39953c4f (diff) | |
parent | 941790d7de6268ba22258bdfb4d0a9ade9390e19 (diff) | |
download | git-16d9d7184bbf39e8c1c9c4756805278f530be30f.zip git-16d9d7184bbf39e8c1c9c4756805278f530be30f.tar.gz git-16d9d7184bbf39e8c1c9c4756805278f530be30f.tar.bz2 |
Merge branch 'en/fast-imexport-nested-tags'
Updates to fast-import/export.
* en/fast-imexport-nested-tags:
fast-export: handle nested tags
t9350: add tests for tags of things other than a commit
fast-export: allow user to request tags be marked with --mark-tags
fast-export: add support for --import-marks-if-exists
fast-import: add support for new 'alias' command
fast-import: allow tags to be identified by mark labels
fast-import: fix handling of deleted tags
fast-export: fix exporting a tag and nothing else
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-x | t/t9300-fast-import.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 0a44a06..e707fb8 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -85,6 +85,36 @@ test_expect_success 'A: create pack from stdin' ' An annotated tag that annotates a blob. EOF + tag to-be-deleted + from :3 + data <<EOF + Another annotated tag that annotates a blob. + EOF + + reset refs/tags/to-be-deleted + from 0000000000000000000000000000000000000000 + + tag nested + mark :6 + from :4 + data <<EOF + Tag of our lovely commit + EOF + + reset refs/tags/nested + from 0000000000000000000000000000000000000000 + + tag nested + mark :7 + from :6 + data <<EOF + Tag of tag of our lovely commit + EOF + + alias + mark :8 + to :5 + INPUT_END git fast-import --export-marks=marks.out <input && git whatchanged master @@ -157,12 +187,19 @@ test_expect_success 'A: verify tag/series-A-blob' ' test_cmp expect actual ' +test_expect_success 'A: verify tag deletion is successful' ' + test_must_fail git rev-parse --verify refs/tags/to-be-deleted +' + test_expect_success 'A: verify marks output' ' cat >expect <<-EOF && :2 $(git rev-parse --verify master:file2) :3 $(git rev-parse --verify master:file3) :4 $(git rev-parse --verify master:file4) :5 $(git rev-parse --verify master^0) + :6 $(git cat-file tag nested | grep object | cut -d" " -f 2) + :7 $(git rev-parse --verify nested) + :8 $(git rev-parse --verify master^0) EOF test_cmp expect marks.out ' |