git-commit-vandalism/refs
Michael Haggerty 4a14f8d093 find_reference_location(): make function safe for empty snapshots
This function had two problems if called for an empty snapshot (i.e.,
`snapshot->start == snapshot->eof == NULL`):

* It checked `NULL < NULL`, which is undefined by C (albeit highly
  unlikely to fail in the real world).

* (Assuming the above comparison behaved as expected), it returned
  NULL when `mustexist` was false, contrary to its docstring.

Change the check and fix the docstring.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-24 12:55:26 -08:00
..
files-backend.c Merge branch 'mh/avoid-rewriting-packed-refs' into maint 2017-12-06 09:08:50 -08:00
iterator.c prefix_ref_iterator: break when we leave the prefix 2017-09-14 15:19:07 +09:00
packed-backend.c find_reference_location(): make function safe for empty snapshots 2018-01-24 12:55:26 -08:00
packed-backend.h files-backend: don't rewrite the packed-refs file unnecessarily 2017-10-30 09:45:15 +09:00
ref-cache.c ref_cache: remove support for storing peeled values 2017-09-25 18:02:46 +09:00
ref-cache.h ref_cache: remove support for storing peeled values 2017-09-25 18:02:46 +09:00
refs-internal.h Merge branch 'mh/mmap-packed-refs' 2017-10-03 15:42:50 +09:00