aboutsummaryrefslogtreecommitdiff
path: root/csum-file.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-04-16 16:21:53 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-03 10:04:13 -0700
commitd43f990fac72264c1553beb7dbc6e8e795083d42 (patch)
tree50444f39e8722dce38c4b8961e4aac9c3de2933e /csum-file.c
parentde7e86f522ea806ef40b3c9557e040d4109e55fb (diff)
downloadgit-d43f990fac72264c1553beb7dbc6e8e795083d42.tar.gz
git-d43f990fac72264c1553beb7dbc6e8e795083d42.tar.xz
branch.c: use ref transaction for all ref updates
Change create_branch to use a ref transaction when creating the new branch. This also fixes a race condition in the old code where two concurrent create_branch could race since the lock_any_ref_for_update/write_ref_sha1 did not protect against the ref already existing. I.e. one thread could end up overwriting a branch even if the forcing flag is false. Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'csum-file.c')
0 files changed, 0 insertions, 0 deletions