From: David Greene <greened@obbligato.org>
To: git@vger.kernel.org
Cc: techlivezheng@gmail.com, alex.crezoff@gmail.com,
davvid@gmail.com, cbailey32@bloomberg.net, danny0838@gmail.com,
prohaska@zib.de, th.acker@arcor.de, sschuberth@gmail.com,
peff@peff.net, gitter.spiros@gmail.com, nod.helm@gmail.com,
"David A . Greene" <greened@obbligato.org>
Subject: [PATCH 4/7] contrib/subtree: Add merge tests
Date: Thu, 5 Nov 2015 21:35:00 -0600 [thread overview]
Message-ID: <1446780903-22156-5-git-send-email-greened@obbligato.org> (raw)
In-Reply-To: <1446780903-22156-1-git-send-email-greened@obbligato.org>
From: Techlive Zheng <techlivezheng@gmail.com>
Add some tests for various merge operations. Test combinations of merge
with --message, --prefix and --squash.
Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
---
contrib/subtree/t/t7900-subtree.sh | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 1fa5991..7d59a1a 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -210,11 +210,22 @@ test_expect_success 'check if --message for merge works with squash too' '
test_expect_success 'merge new subproj history into subdir' '
git subtree merge --prefix="sub dir" FETCH_HEAD &&
- git branch pre-split &&
check_equal ''"$(last_commit_message)"'' "Merge commit '"'"'"$(git rev-parse sub2)"'"'"' into mainline" &&
undo
'
+test_expect_success 'merge new subproj history into subdir/ with --prefix and --message' '
+ git subtree merge --prefix="sub dir" --message="Merged changes from subproject" FETCH_HEAD &&
+ check_equal "$(last_commit_message)" "Merged changes from subproject" &&
+ undo
+'
+
+test_expect_success 'merge new subproj history into subdir/ with --squash and --prefix and --message' '
+ git subtree merge --prefix="sub dir" --message="Merged changes from subproject using squash" --squash FETCH_HEAD &&
+ check_equal "$(last_commit_message)" "Merged changes from subproject using squash" &&
+ undo
+'
+
test_expect_success 'split requires option --prefix' '
echo "You must provide the --prefix option." > expected &&
test_must_fail git subtree split > actual 2>&1 &&
--
2.6.1
next prev parent reply other threads:[~2015-11-06 4:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 3:34 (unknown), David Greene
2015-11-06 3:34 ` [PATCH 1/7] contrib/subtree: Clean and refactor test code David Greene
2015-11-11 2:52 ` David A. Greene
2015-11-06 3:34 ` [PATCH 2/7] contrib/subtree: Add test for missing subtree David Greene
2015-11-06 3:34 ` [PATCH 3/7] contrib/subtree: Add tests for subtree add David Greene
2015-11-06 3:35 ` David Greene [this message]
2015-11-06 3:35 ` [PATCH 5/7] contrib/subtree: Add split tests David Greene
2015-11-06 3:35 ` [PATCH 6/7] contrib/subtree: Make each test self-contained David Greene
2015-11-06 3:35 ` [PATCH 7/7] contrib/subtree: Handle '--prefix' argument with a slash appended David Greene
-- strict thread matches above, loose matches on Subject: below --
2015-11-13 2:32 [PATCH 0/7] contrib/subtree: Testsuite cleanup David Greene
2015-11-13 2:32 ` [PATCH 4/7] contrib/subtree: Add merge tests David Greene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446780903-22156-5-git-send-email-greened@obbligato.org \
--to=greened@obbligato.org \
--cc=alex.crezoff@gmail.com \
--cc=cbailey32@bloomberg.net \
--cc=danny0838@gmail.com \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitter.spiros@gmail.com \
--cc=nod.helm@gmail.com \
--cc=peff@peff.net \
--cc=prohaska@zib.de \
--cc=sschuberth@gmail.com \
--cc=techlivezheng@gmail.com \
--cc=th.acker@arcor.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.