summaryrefslogtreecommitdiff
path: root/git-merge-octopus.sh
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-03-19 20:01:15 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-03-19 08:40:19 -0700
commit3aba2fddcbff6ba611c05eabeb4a8561c119275f (patch)
tree5ee775d329a1b00981477c898c63dd130d6c64d7 /git-merge-octopus.sh
parentGit 1.7.12.4 (diff)
downloadtgif-3aba2fddcbff6ba611c05eabeb4a8561c119275f.tar.xz
index-pack: protect deepest_delta in multithread code
deepest_delta is a global variable but is updated without protection in resolve_delta(), a multithreaded function. Add a new mutex for it, but only protect and update when it's actually used (i.e. show_stat is non-zero). Another variable that will not be updated is delta_depth in "struct object_entry" as it's only useful when show_stat is 1. Putting it in "if (show_stat)" makes it clearer. The local variable "stat" is renamed to "show_stat" after moving to global scope because the name "stat" conflicts with stat(2) syscall. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-merge-octopus.sh')
0 files changed, 0 insertions, 0 deletions