aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTechlive Zheng <techlivezheng@gmail.com>2015-11-12 20:32:31 -0600
committerJeff King <peff@peff.net>2015-11-13 00:02:56 -0500
commita686701184bc9e3d54b2870455f3ff276360299e (patch)
tree81eed79cfd79b289b473198a9862185da27df997 /contrib
parentb0638aa2f8f7fa4e9c5d8569ee30b64fc21fba32 (diff)
downloadgit-a686701184bc9e3d54b2870455f3ff276360299e.tar.gz
git-a686701184bc9e3d54b2870455f3ff276360299e.tar.xz
contrib/subtree: Add test for missing subtree
Test that a merge from a non-existant subtree fails. Signed-off-by: Techlive Zheng <techlivezheng@gmail.com> Signed-off-by: David A. Greene <greened@obbligato.org> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index f9dda3d6f..4471786f5 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -123,6 +123,10 @@ test_expect_success 'no pull from non-existant subtree' '
test_must_fail git subtree pull --prefix="sub dir" ./"sub proj" sub1
'
+test_expect_success 'no merge from non-existent subtree' '
+ test_must_fail git subtree merge --prefix="sub dir" FETCH_HEAD
+'
+
test_expect_success 'check if --message works for add' '
git subtree add --prefix="sub dir" --message="Added subproject" sub1 &&
check_equal ''"$(last_commit_message)"'' "Added subproject" &&