diff options
author | Ronnie Sahlberg <sahlberg@google.com> | 2014-04-17 11:31:06 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-03 10:04:15 -0700 |
commit | b6b10bb44c31b5a830c1636c7eb8b122f9b67858 (patch) | |
tree | 55d8c147f8a2fa8db357502bf91d1362b77e9004 /url.c | |
parent | 3f09ba754367fcc0ddad94e22385d80b5f317584 (diff) | |
download | git-b6b10bb44c31b5a830c1636c7eb8b122f9b67858.tar.gz git-b6b10bb44c31b5a830c1636c7eb8b122f9b67858.tar.xz |
walker.c: use ref transaction for ref updates
Switch to using ref transactions in walker_fetch(). As part of the refactoring
to use ref transactions we also fix a potential memory leak where in the
original code if write_ref_sha1() would fail we would end up returning from
the function without free()ing the msg string.
Note that this function is only called when fetching from a remote HTTP
repository onto the local (most of the time single-user) repository which
likely means that the type of collisions that the previous locking would
protect against and cause the fetch to fail for are even more rare.
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 'url.c')
0 files changed, 0 insertions, 0 deletions