diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-01 12:51:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-01 12:51:50 -0700 |
commit | a38d3d76b6d1c70b566633e1629aa3b0e856810e (patch) | |
tree | 86ebeb9b69d2bf4b205b2c7ee31089aa405520f7 /t/t6200-fmt-merge-msg.sh | |
parent | 9a94dba012b6b892c97d6eaf10d26f256d8dbfde (diff) | |
download | git-a38d3d76b6d1c70b566633e1629aa3b0e856810e.tar.gz git-a38d3d76b6d1c70b566633e1629aa3b0e856810e.tar.xz |
t6200: test message for merging of an annotated tag
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6200-fmt-merge-msg.sh')
-rwxr-xr-x | t/t6200-fmt-merge-msg.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh index f84bb0c81..f73eceabf 100755 --- a/t/t6200-fmt-merge-msg.sh +++ b/t/t6200-fmt-merge-msg.sh @@ -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 |