Skip to content

Commit

Permalink
Merge branch 'jl/subtree-check-parents-argument-passing-fix' into jch
Browse files Browse the repository at this point in the history
Fix performance-releated bug in "git subtree" (in contrib/).

* jl/subtree-check-parents-argument-passing-fix:
  subtree: fix argument handling in check_parents
  • Loading branch information
gitster committed Jan 5, 2022
2 parents 6a9523b + 3ce8888 commit a795af2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions contrib/subtree/git-subtree.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit a795af2

Please sign in to comment.