Skip to content

Commit

Permalink
t6200: test message for merging of an annotated tag
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Apr 1, 2013
1 parent 9a94dba commit a38d3d7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions t/t6200-fmt-merge-msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,43 @@ test_expect_success 'merge-msg lots of commits' '
test_cmp expected actual
'

test_expect_success 'merge-msg with "merging" an annotated tag' '
test_config merge.log true &&
git checkout master^0 &&
git commit --allow-empty -m "One step ahead" &&
git tag -a -m "An annotated one" annote HEAD &&
git checkout master &&
git fetch . annote &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
{
cat <<-\EOF
Merge tag '\''annote'\''
An annotated one
* tag '\''annote'\'':
One step ahead
EOF
} >expected &&
test_cmp expected actual &&
test_when_finished "git reset --hard" &&
annote=$(git rev-parse annote) &&
git merge --no-commit $annote &&
{
cat <<-EOF
Merge tag '\''$annote'\''
An annotated one
* tag '\''$annote'\'':
One step ahead
EOF
} >expected &&
test_cmp expected .git/MERGE_MSG
'

test_done

0 comments on commit a38d3d7

Please sign in to comment.