Don't shell out to git to resolve upstream branches unnecessarily
Even though we already know the parent is origin/main, every branch that is parented to origin/main ends up shelling out to git in the upstream() function, just to double-check that origin/main exists. If the parent has already been registered, don't bother repeating the work. This cuts out about half of the times that git map-branches shells out to git and reduces it from 1.7s to 1.2s on my machine. Change-Id: Ic5fdaaa5bc62ed8a3574f5a28f9f783093dacc2f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5498460 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com> Auto-Submit: David Benjamin <davidben@chromium.org>changes/60/5498460/2
parent
2f0f9bc0bd
commit
54b27c0a13
Loading…
Reference in New Issue