Skip to content

Commit a686701

Browse files
weynhamzpeff
authored andcommitted
contrib/subtree: Add test for missing subtree
Test that a merge from a non-existant subtree fails. Signed-off-by: Techlive Zheng <[email protected]> Signed-off-by: David A. Greene <[email protected]> Signed-off-by: Jeff King <[email protected]>
1 parent b0638aa commit a686701

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/subtree/t/t7900-subtree.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ test_expect_success 'no pull from non-existant subtree' '
123123
test_must_fail git subtree pull --prefix="sub dir" ./"sub proj" sub1
124124
'
125125

126+
test_expect_success 'no merge from non-existent subtree' '
127+
test_must_fail git subtree merge --prefix="sub dir" FETCH_HEAD
128+
'
129+
126130
test_expect_success 'check if --message works for add' '
127131
git subtree add --prefix="sub dir" --message="Added subproject" sub1 &&
128132
check_equal ''"$(last_commit_message)"'' "Added subproject" &&

0 commit comments

Comments
 (0)