Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-07-30 20:06:42 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-30 22:41:49 +0300
commit21531927e4e1b9fdf524983414ee59558cb4f3d6 (patch)
treeee983ff87cb5f89572dbf828af69a3f10dbc491f /t/t6200-fmt-merge-msg.sh
parent489947cee5095b168cbac111ff7bd1eadbbd90dd (diff)
Revert "fmt-merge-msg: stop treating `master` specially"
This reverts commit 489947cee5095b168cbac111ff7bd1eadbbd90dd, which stopped treating merges into the 'master' branch as special when preparing the default merge message. As the goal was not to have any single branch designated as special, it solved it by leaving the "into <branchname>" at the end of the title of the default merge message for any and all branches. An obvious and easy alternative to treat everybody equally could have been to remove it for every branch, but that involves loss of information. We'll introduce a new mechanism to let end-users specify merges into which branches would omit the "into <branchname>" from the title of the default merge message, and make the mechanism, when unconfigured, treat the traditional 'master' special again, so all the changes to the tests we made earlier will become unnecessary, as these tests will be run without configuring the said new mechanism. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6200-fmt-merge-msg.sh')
-rwxr-xr-xt/t6200-fmt-merge-msg.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh
index 2b3fd498d0..e4c2a6eca4 100755
--- a/t/t6200-fmt-merge-msg.sh
+++ b/t/t6200-fmt-merge-msg.sh
@@ -79,7 +79,7 @@ test_expect_success GPG 'set up a signed tag' '
'
test_expect_success 'message for merging local branch' '
- echo "Merge branch ${apos}left${apos} into master" >expected &&
+ echo "Merge branch ${apos}left${apos}" >expected &&
git checkout master &&
git fetch . left &&
@@ -107,7 +107,7 @@ test_expect_success GPG 'message for merging local tag signed by unknown key' '
'
test_expect_success 'message for merging external branch' '
- echo "Merge branch ${apos}left${apos} of $(pwd) into master" >expected &&
+ echo "Merge branch ${apos}left${apos} of $(pwd)" >expected &&
git checkout master &&
git fetch "$(pwd)" left &&
@@ -118,7 +118,7 @@ test_expect_success 'message for merging external branch' '
test_expect_success '[merge] summary/log configuration' '
cat >expected <<-EOF &&
- Merge branch ${apos}left${apos} into master
+ Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
@@ -160,7 +160,7 @@ test_expect_success 'setup FETCH_HEAD' '
test_expect_success 'merge.log=3 limits shortlog length' '
cat >expected <<-EOF &&
- Merge branch ${apos}left${apos} into master
+ Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
@@ -177,7 +177,7 @@ test_expect_success 'merge.log=3 limits shortlog length' '
test_expect_success 'merge.log=5 shows all 5 commits' '
cat >expected <<-EOF &&
- Merge branch ${apos}left${apos} into master
+ Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
@@ -195,7 +195,7 @@ test_expect_success 'merge.log=5 shows all 5 commits' '
test_expect_success '--log=5 with custom comment character' '
cat >expected <<-EOF &&
- Merge branch ${apos}left${apos} into master
+ Merge branch ${apos}left${apos}
x By Another Author (3) and A U Thor (2)
x Via Another Committer
@@ -212,14 +212,14 @@ test_expect_success '--log=5 with custom comment character' '
'
test_expect_success 'merge.log=0 disables shortlog' '
- echo "Merge branch ${apos}left${apos} into master" >expected &&
+ echo "Merge branch ${apos}left${apos}" >expected &&
git -c merge.log=0 fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
'
test_expect_success '--log=3 limits shortlog length' '
cat >expected <<-EOF &&
- Merge branch ${apos}left${apos} into master
+ Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
@@ -236,7 +236,7 @@ test_expect_success '--log=3 limits shortlog length' '
test_expect_success '--log=5 shows all 5 commits' '
cat >expected <<-EOF &&
- Merge branch ${apos}left${apos} into master
+ Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
@@ -253,13 +253,13 @@ test_expect_success '--log=5 shows all 5 commits' '
'
test_expect_success '--no-log disables shortlog' '
- echo "Merge branch ${apos}left${apos} into master" >expected &&
+ echo "Merge branch ${apos}left${apos}" >expected &&
git fmt-merge-msg --no-log <.git/FETCH_HEAD >actual &&
test_cmp expected actual
'
test_expect_success '--log=0 disables shortlog' '
- echo "Merge branch ${apos}left${apos} into master" >expected &&
+ echo "Merge branch ${apos}left${apos}" >expected &&
git fmt-merge-msg --no-log <.git/FETCH_HEAD >actual &&
test_cmp expected actual
'
@@ -300,7 +300,7 @@ test_expect_success 'fmt-merge-msg -m' '
test_expect_success 'setup: expected shortlog for two branches' '
cat >expected <<-EOF
- Merge branches ${apos}left${apos} and ${apos}right${apos} into master
+ Merge branches ${apos}left${apos} and ${apos}right${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
@@ -397,7 +397,7 @@ test_expect_success 'merge-msg with nothing to merge' '
test_expect_success 'merge-msg tag' '
cat >expected <<-EOF &&
- Merge tag ${apos}tag-r3${apos} into master
+ Merge tag ${apos}tag-r3${apos}
* tag ${apos}tag-r3${apos}:
Right #3
@@ -418,7 +418,7 @@ test_expect_success 'merge-msg tag' '
test_expect_success 'merge-msg two tags' '
cat >expected <<-EOF &&
- Merge tags ${apos}tag-r3${apos} and ${apos}tag-l5${apos} into master
+ Merge tags ${apos}tag-r3${apos} and ${apos}tag-l5${apos}
* tag ${apos}tag-r3${apos}:
Right #3
@@ -448,7 +448,7 @@ test_expect_success 'merge-msg two tags' '
test_expect_success 'merge-msg tag and branch' '
cat >expected <<-EOF &&
- Merge branch ${apos}left${apos}, tag ${apos}tag-r3${apos} into master
+ Merge branch ${apos}left${apos}, tag ${apos}tag-r3${apos}
* tag ${apos}tag-r3${apos}:
Right #3
@@ -479,7 +479,7 @@ test_expect_success 'merge-msg tag and branch' '
test_expect_success 'merge-msg lots of commits' '
{
cat <<-EOF &&
- Merge branch ${apos}long${apos} into master
+ Merge branch ${apos}long${apos}
* long: (35 commits)
EOF
@@ -516,7 +516,7 @@ test_expect_success 'merge-msg with "merging" an annotated tag' '
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
{
cat <<-\EOF
- Merge tag '\''annote'\'' into master
+ Merge tag '\''annote'\''
An annotated one
@@ -531,7 +531,7 @@ test_expect_success 'merge-msg with "merging" an annotated tag' '
git merge --no-commit --no-ff $annote &&
{
cat <<-EOF
- Merge tag '\''$annote'\'' into master
+ Merge tag '\''$annote'\''
An annotated one