Skip to content

Commit

Permalink
contrib/subtree: Add test for missing subtree
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
weynhamz authored and peff committed Nov 13, 2015
1 parent b0638aa commit a686701
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/subtree/t/t7900-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" &&
Expand Down

0 comments on commit a686701

Please sign in to comment.