Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t5305-include-tag.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t5305-include-tag.sh` 121 lines ยท 3089 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='git pack-object --include-tag' 4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 7 . ./test-lib.sh 8 9 TRASH=$(pwd) 10 11 test_expect_success setup ' 12 echo c >d && 13 git update-index --add d && 14 tree=$(git write-tree) && 15 commit=$(git commit-tree $tree sig && 17 echo "type commit" >>sig && 18 echo "tag mytag" >>sig && 19 echo "tagger $(git var GIT_COMMITTER_IDENT)" >>sig && 20 echo >>sig && 21 echo "our test tag" >>sig && 22 tag=$(git mktag obj-list 29 ' 30 31 test_expect_success 'pack without --include-tag' ' 32 packname=$(git pack-objects \ 33 --window=0 \ 34 test-no-include list.expect && 45 test_must_fail git -C clone.git cat-file -e $tag && 46 git -C clone.git rev-list --objects $commit >list.actual && 47 test_cmp list.expect list.actual 48 ' 49 50 test_expect_success 'pack with --include-tag' ' 51 packname=$(git pack-objects \ 52 --window=0 \ 53 --include-tag \ 54 test-include list.expect && 65 git -C clone.git rev-list --objects $tag >list.actual && 66 test_cmp list.expect list.actual 67 ' 68 69 # A tag of a tag, where the "inner" tag is not otherwise 70 # reachable, and a full peel points to a commit reachable from HEAD. 71 test_expect_success 'create hidden inner tag' ' 72 test_commit commit && 73 git tag -m inner inner HEAD && 74 git tag -m outer outer inner && 75 git tag -d inner 76 ' 77 78 test_expect_success 'pack explicit outer tag' ' 79 packname=$( 80 { 81 echo HEAD && 82 echo outer 83 } | 84 git pack-objects --revs test-hidden-explicit 85 ) 86 ' 87 88 test_expect_success 'unpack objects' ' 89 rm -rf clone.git && 90 git init clone.git && 91 git -C clone.git unpack-objects