summaryrefslogtreecommitdiff
path: root/git-mergetool.sh
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2018-01-24 12:14:13 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-01-24 12:55:26 -0800
commit4a14f8d093138a313070fd6a50204eda66c1f9eb (patch)
treedd2a8d461a25cc336cdcf2ce0e7f351dbdaf0a7c /git-mergetool.sh
parentcreate_snapshot(): use `xmemdupz()` rather than a strbuf (diff)
downloadtgif-4a14f8d093138a313070fd6a50204eda66c1f9eb.tar.xz
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>
Diffstat (limited to 'git-mergetool.sh')
0 files changed, 0 insertions, 0 deletions