aboutsummaryrefslogtreecommitdiffstats
path: root/commit.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2016-04-07 15:03:02 -0400
committerJunio C Hamano <gitster@pobox.com>2016-04-10 11:35:26 -0700
commit42a38cf788428bf39db1729ee8c79c64252a2849 (patch)
tree9da153c610ce20707eac39cec0fcd248f65aba21 /commit.c
parentfiles-backend: break out ref reading (diff)
downloadgit-42a38cf788428bf39db1729ee8c79c64252a2849.tar.gz
git-42a38cf788428bf39db1729ee8c79c64252a2849.zip
read_raw_ref(): manage own scratch space
Instead of creating scratch space in resolve_ref_unsafe() and passing it down through resolve_ref_1 to read_raw_ref(), teach read_raw_ref() to manage its own scratch space. This reduces coupling across the functions at the cost of some extra allocations. Also, when read_raw_ref() is implemented for different reference backends, the other implementations might have different scratch space requirements. Note that we now preserve errno across the calls to strbuf_release(), which calls free() and can thus theoretically overwrite errno. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions