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>
Techlive Zheng committed
Nov 12, 2015 at 20:32 UTC
a686701184bc9e3d54b2870455f3ff276360299e
1 file changed
+4
contrib/subtree/t/t7900-subtree.sh
+4
@@ -123,6 +123,10 @@ test_expect_success 'no pull from non-existant subtree' '
123
test_must_fail git subtree pull --prefix="sub dir" ./"sub proj" sub1
124
'
125
126
+test_expect_success 'no merge from non-existent subtree' '
127
+ test_must_fail git subtree merge --prefix="sub dir" FETCH_HEAD
128
+'
129
+
130
test_expect_success 'check if --message works for add' '
131
git subtree add --prefix="sub dir" --message="Added subproject" sub1 &&
132
check_equal ''"$(last_commit_message)"'' "Added subproject" &&