summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-09-15 23:10:34 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-05 13:45:30 -0700
commit287750507d3859ff65a7b0baac5ba1fdf30e9604 (patch)
tree3b07eb9245d19fbef7db86837a2062d431610d22 /commit.c
parent1f58a0383857e5328e3e4d248d6c4a3485098679 (diff)
downloadgit-287750507d3859ff65a7b0baac5ba1fdf30e9604.tar.gz
resolve_ref(): turn buffer into a proper string as soon as possible
Immediately strip off trailing spaces and null-terminate the string holding the contents of the reference file; this allows the use of string functions and avoids the need to keep separate track of the string's length. (get_sha1_hex() fails automatically if the string is too short.) Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions