Skip to content

Commit

Permalink
Merge branch 'jl/subtree-check-parents-argument-passing-fix' into seen
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 Dec 6, 2021
2 parents f316254 + 8b4b604 commit 840a2fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions contrib/subtree/git-subtree.sh
Original file line number Diff line number Diff line change
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 840a2fc

Please sign in to comment.