summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2010-03-24 07:15:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-25 02:39:40 (GMT)
commit419fe5bc861517c789c8f028519e085fd8d1992f (patch)
treedfbdaf404cfbfc3c70218e5639aca663d87ea95c /t
parent5e4f61474202122f376b16181b760f390623bf4e (diff)
downloadgit-419fe5bc861517c789c8f028519e085fd8d1992f.zip
git-419fe5bc861517c789c8f028519e085fd8d1992f.tar.gz
git-419fe5bc861517c789c8f028519e085fd8d1992f.tar.bz2
fmt-merge-msg: be quiet if nothing to merge
When FETCH_HEAD contains only 'not-for-merge' entries fmt-merge-msg still outputs "Merge" (and if the branch isn't master " into <branch>"). In this case fmt-merge-msg is outputting junk and should really just be quiet. Fix it. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t6200-fmt-merge-msg.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh
index 42f6fff..ade209a 100755
--- a/t/t6200-fmt-merge-msg.sh
+++ b/t/t6200-fmt-merge-msg.sh
@@ -21,6 +21,8 @@ test_expect_success setup '
setdate &&
git commit -m "Initial" &&
+ git clone . remote &&
+
echo uno >one &&
echo dos >two &&
git add two &&
@@ -240,4 +242,21 @@ test_expect_success 'merge-msg -F in subdirectory' '
test_cmp expected actual
'
+test_expect_success 'merge-msg with nothing to merge' '
+
+ git config --unset-all merge.log
+ git config --unset-all merge.summary
+ git config merge.summary yes &&
+
+ (
+ cd remote &&
+ git checkout -b unrelated &&
+ setdate &&
+ git fetch origin &&
+ git fmt-merge-msg <.git/FETCH_HEAD >../actual
+ ) &&
+
+ test_cmp /dev/null actual
+'
+
test_done