diff options
Diffstat (limited to 'contrib/subtree')
-rwxr-xr-x | contrib/subtree/git-subtree.sh | 11 | ||||
-rwxr-xr-x | contrib/subtree/t/t7900-subtree.sh | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 7f767b5c38..1af1d9653e 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -296,10 +296,9 @@ cache_miss () { done } -# Usage: check_parents PARENTS_EXPR +# Usage: check_parents [REVS...] check_parents () { - assert test $# = 1 - missed=$(cache_miss "$1") || exit $? + missed=$(cache_miss "$@") || exit $? local indent=$(($indent + 1)) for miss in $missed do @@ -753,7 +752,7 @@ process_split_commit () { fi createcount=$(($createcount + 1)) debug "parents: $parents" - check_parents "$parents" + check_parents $parents newparents=$(cache_get $parents) || exit $? debug "newparents: $newparents" @@ -976,10 +975,10 @@ cmd_merge () { if test -n "$arg_addmerge_message" then - git merge -Xsubtree="$arg_prefix" \ + git merge --no-ff -Xsubtree="$arg_prefix" \ --message="$arg_addmerge_message" "$rev" else - git merge -Xsubtree="$arg_prefix" $rev + git merge --no-ff -Xsubtree="$arg_prefix" $rev fi } diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index 4153b65321..1c1f76f04a 100755 --- a/contrib/subtree/t/t7900-subtree.sh +++ b/contrib/subtree/t/t7900-subtree.sh @@ -1445,7 +1445,7 @@ test_expect_success 'subtree descendant check' ' ) && test_create_commit "$test_count" folder_subtree/0 && test_create_commit "$test_count" folder_subtree/b && - cherry=$(cd "$test_count"; git rev-parse HEAD) && + cherry=$(cd "$test_count" && git rev-parse HEAD) && ( cd "$test_count" && git checkout branch |