remove parts of tag_create_ssh_signed which just duplicate the tag_create test
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
diff --git a/regress/cmdline/tag.sh b/regress/cmdline/tag.sh
index 6a9b885..0924766 100755
--- a/regress/cmdline/tag.sh
+++ b/regress/cmdline/tag.sh
@@ -349,70 +349,6 @@ test_tag_create_ssh_signed() {
ret=$?
if [ $ret -ne 0 ]; then
echo "got checkout command failed unexpectedly"
- test_done "$testroot" "$ret"
- return 1
- fi
-
- # Create a tag based on implied worktree HEAD ref
- (cd $testroot/wt && got tag -m 'test' $tag2 > $testroot/stdout)
- ret=$?
- if [ $ret -ne 0 ]; then
- test_done "$testroot" "$ret"
- return 1
- fi
-
- tag_id2=`got ref -r $testroot/repo -l \
- | grep "^refs/tags/$tag2" | tr -d ' ' | cut -d: -f2`
- echo "Created tag $tag_id2" > $testroot/stdout.expected
- cmp -s $testroot/stdout $testroot/stdout.expected
- ret=$?
- if [ $ret -ne 0 ]; then
- diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$ret"
- return 1
- fi
-
- (cd $testroot/repo && git checkout -q $tag2)
- ret=$?
- if [ $ret -ne 0 ]; then
- echo "git checkout command failed unexpectedly"
- test_done "$testroot" "$ret"
- return 1
- fi
-
- # Attempt to create a tag pointing at a non-commit
- local tree_id=`git_show_tree $testroot/repo`
- (cd $testroot/wt && got tag -m 'test' -c $tree_id foobar \
- 2> $testroot/stderr)
- ret=$?
- if [ $ret -eq 0 ]; then
- echo "git tag command succeeded unexpectedly"
- test_done "$testroot" "1"
- return 1
- fi
-
- echo "got: commit $tree_id: object not found" \
- > $testroot/stderr.expected
- cmp -s $testroot/stderr $testroot/stderr.expected
- ret=$?
- if [ $ret -ne 0 ]; then
- diff -u $testroot/stderr.expected $testroot/stderr
- test_done "$testroot" "$ret"
- return 1
- fi
-
- got ref -r $testroot/repo -l > $testroot/stdout
- echo "HEAD: $commit_id" > $testroot/stdout.expected
- echo -n "refs/got/worktree/base-" >> $testroot/stdout.expected
- cat $testroot/wt/.got/uuid | tr -d '\n' >> $testroot/stdout.expected
- echo ": $commit_id" >> $testroot/stdout.expected
- echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
- echo "refs/tags/$tag: $tag_id" >> $testroot/stdout.expected
- echo "refs/tags/$tag2: $tag_id2" >> $testroot/stdout.expected
- cmp -s $testroot/stdout $testroot/stdout.expected
- ret=$?
- if [ $ret -ne 0 ]; then
- diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
}