Skip to content

Commit 9b6eda0

Browse files
committed
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
2 parents c0450ca + 3ce8888 commit 9b6eda0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

contrib/subtree/git-subtree.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,9 @@ cache_miss () {
296296
done
297297
}
298298

299-
# Usage: check_parents PARENTS_EXPR
299+
# Usage: check_parents [REVS...]
300300
check_parents () {
301-
assert test $# = 1
302-
missed=$(cache_miss "$1") || exit $?
301+
missed=$(cache_miss "$@") || exit $?
303302
local indent=$(($indent + 1))
304303
for miss in $missed
305304
do
@@ -753,7 +752,7 @@ process_split_commit () {
753752
fi
754753
createcount=$(($createcount + 1))
755754
debug "parents: $parents"
756-
check_parents "$parents"
755+
check_parents $parents
757756
newparents=$(cache_get $parents) || exit $?
758757
debug "newparents: $newparents"
759758

0 commit comments

Comments
 (0)