diff options
| author | Michael Haggerty <mhagger@alum.mit.edu> | 2011-09-15 23:10:34 +0200 | 
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-10-05 13:45:30 -0700 | 
| commit | 287750507d3859ff65a7b0baac5ba1fdf30e9604 (patch) | |
| tree | 3b07eb9245d19fbef7db86837a2062d431610d22 /diff.c | |
| parent | 1f58a0383857e5328e3e4d248d6c4a3485098679 (diff) | |
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 'diff.c')
0 files changed, 0 insertions, 0 deletions
