From: Techlive Zheng Date: Fri, 13 Nov 2015 02:32:31 +0000 (-0600) Subject: contrib/subtree: Add test for missing subtree X-Git-Tag: v2.7.0-rc0~25^2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a686701184bc9e3d54b2870455f3ff276360299e?ds=inline;hp=--cc contrib/subtree: Add test for missing subtree Test that a merge from a non-existant subtree fails. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene Signed-off-by: Jeff King --- a686701184bc9e3d54b2870455f3ff276360299e diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index f9dda3d6f9..4471786f50 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" &&