From: Ronnie Sahlberg Date: Thu, 17 Apr 2014 18:31:06 +0000 (-0700) Subject: walker.c: use ref transaction for ref updates X-Git-Tag: v2.2.0-rc0~139^2~8 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b6b10bb44c31b5a830c1636c7eb8b122f9b67858?hp=b6b10bb44c31b5a830c1636c7eb8b122f9b67858 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 Reviewed-by: Michael Haggerty Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano ---