diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-01-10 22:52:54 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-10 22:52:54 +0300 |
commit | 9b6eda0785e9e6422e0a975901514043a05a9e47 (patch) | |
tree | efa1c53671a09d80eff65375c4df1648d303f342 /contrib | |
parent | c0450ca09864baae1cd80b746500aaef2eeda956 (diff) | |
parent | 3ce8888fb499f9646b770306be6e2c7674a75199 (diff) |
Merge branch 'jl/subtree-check-parents-argument-passing-fix'
Fix performance-releated bug in "git subtree" (in contrib/).
* jl/subtree-check-parents-argument-passing-fix:
subtree: fix argument handling in check_parents
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/subtree/git-subtree.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 7f767b5c38..71f1fd94bd 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" |