summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-06 18:35:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-06 18:35:02 (GMT)
commite7cc0ede1837b6f679e245e29ae3687fc5e6c20d (patch)
treef20fa96fad6afd13fd97cd895bdbc7e173a3c29e /t
parent7e03f416633b5dbd242d6552e239d50a821262c6 (diff)
parentad2f7255b3e93dacd0982a946d30f6595dd8a805 (diff)
downloadgit-e7cc0ede1837b6f679e245e29ae3687fc5e6c20d.zip
git-e7cc0ede1837b6f679e245e29ae3687fc5e6c20d.tar.gz
git-e7cc0ede1837b6f679e245e29ae3687fc5e6c20d.tar.bz2
Merge branch 'mk/show-s-no-extra-blank-line-for-merges'
* mk/show-s-no-extra-blank-line-for-merges: git-show: fix 'git show -s' to not add extra terminator after merge commit
Diffstat (limited to 't')
-rwxr-xr-xt/t1507-rev-parse-upstream.sh2
-rwxr-xr-xt/t7007-show.sh10
-rwxr-xr-xt/t7600-merge.sh11
3 files changed, 13 insertions, 10 deletions
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index 178694e..1978947 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -121,7 +121,7 @@ test_expect_success 'merge my-side@{u} records the correct name' '
git branch -D new ;# can fail but is ok
git branch -t new my-side@{u} &&
git merge -s ours new@{u} &&
- git show -s --pretty=format:%s >actual &&
+ git show -s --pretty=tformat:%s >actual &&
echo "Merge remote-tracking branch ${sq}origin/side${sq}" >expect &&
test_cmp expect actual
)
diff --git a/t/t7007-show.sh b/t/t7007-show.sh
index e41fa00..1b824fe 100755
--- a/t/t7007-show.sh
+++ b/t/t7007-show.sh
@@ -24,7 +24,8 @@ test_expect_success 'set up a bit of history' '
git tag -m "annotated tag" annotated &&
git checkout -b side HEAD^^ &&
test_commit side2 &&
- test_commit side3
+ test_commit side3 &&
+ test_merge merge main3
'
test_expect_success 'showing two commits' '
@@ -109,8 +110,11 @@ test_expect_success 'showing range' '
'
test_expect_success '-s suppresses diff' '
- echo main3 >expect &&
- git show -s --format=%s main3 >actual &&
+ cat >expect <<-\EOF &&
+ merge
+ main3
+ EOF
+ git show -s --format=%s merge main3 >actual &&
test_cmp expect actual
'
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 10aa028..b164621 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -57,11 +57,10 @@ create_merge_msgs () {
git log --no-merges ^HEAD c2 c3
} >squash.1-5-9 &&
: >msg.nologff &&
- echo >msg.nolognoff &&
+ : >msg.nolognoff &&
{
echo "* tag 'c3':" &&
- echo " commit 3" &&
- echo
+ echo " commit 3"
} >msg.log
}
@@ -71,7 +70,7 @@ verify_merge () {
git diff --exit-code &&
if test -n "$3"
then
- git show -s --pretty=format:%s HEAD >msg.act &&
+ git show -s --pretty=tformat:%s HEAD >msg.act &&
test_cmp "$3" msg.act
fi
}
@@ -620,10 +619,10 @@ test_expect_success 'merge early part of c2' '
git tag c6 &&
git branch -f c5-branch c5 &&
git merge c5-branch~1 &&
- git show -s --pretty=format:%s HEAD >actual.branch &&
+ git show -s --pretty=tformat:%s HEAD >actual.branch &&
git reset --keep HEAD^ &&
git merge c5~1 &&
- git show -s --pretty=format:%s HEAD >actual.tag &&
+ git show -s --pretty=tformat:%s HEAD >actual.tag &&
test_cmp expected.branch actual.branch &&
test_cmp expected.tag actual.tag
'