summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2017-01-13 12:54:39 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-15 15:59:03 -0800
commit771e7d578ee93753f5ac0ed346effd0af3d5a4b4 (patch)
tree56e1e2fea24ed1a7ea83bedacc71cd6d31b6cf46 /configure.ac
parentt1450: refactor loose-object removal (diff)
downloadtgif-771e7d578ee93753f5ac0ed346effd0af3d5a4b4.tar.xz
sha1_file: fix error message for alternate objects
When we fail to open a corrupt loose object, we report an error and mention the filename via sha1_file_name(). However, that function will always give us a path in the local repository, whereas the corrupt object may have come from an alternate. The result is a very misleading error message. Teach the open_sha1_file() and stat_sha1_file() helpers to pass back the path they found, so that we can report it correctly. Note that the pointers we return go to static storage (e.g., from sha1_file_name()), which is slightly dangerous. However, these helpers are static local helpers, and the names are used for immediately generating error messages. The simplicity is an acceptable tradeoff for the danger. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions