git branch: fix performance problem