summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2016-11-01 09:49:07 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-11-01 10:56:39 -0700
commit3e98919a188e36f34c1a20e23ecf2ff1f5da75c9 (patch)
tree05b5ca11379495d3dd7dbd92ce2a725895da6c57 /sha1_file.c
parentdiff: handle sha1 abbreviations outside of repository (diff)
downloadtgif-3e98919a188e36f34c1a20e23ecf2ff1f5da75c9.tar.xz
sha1_name: make wraparound of the index into ring-buffer explicit
Overflow is defined for unsigned integers, but not for signed ones. Wrap around explicitly for the new ring-buffer in find_unique_abbrev() as we did in bb84735c for the ones in sha1_to_hex() and get_pathname(), thus avoiding signed overflows and getting rid of the magic number 3. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
0 files changed, 0 insertions, 0 deletions