diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-10-28 11:13:06 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-03 09:24:47 -0700 |
commit | b6c4ceccb3d6026c612fa55865c51374b26eb176 (patch) | |
tree | 22a224dc90c5eae4684aaf363cc25a8ac616685a /compat/strcasestr.c | |
parent | Git 1.7.3 (diff) | |
download | tgif-b6c4ceccb3d6026c612fa55865c51374b26eb176.tar.xz |
read_sha1_file(): report correct name of packfile with a corrupt object
Clarify the error reporting logic by moving the normal codepath (i.e. we
read the object we wanted to read correctly) up and return early.
The logic to report the name of the packfile with a corrupt object,
introduced by e8b15e6 (sha1_file: Show the the type and path to corrupt
objects, 2010-06-10), was totally bogus. The function that knows which
bad object came from what packfile is has_packed_and_bad(); make it report
which packfile the problem was found.
"Corrupt" is already an adjective, e.g. an object is "corrupt"; we do not
have to say "corrupted object".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/strcasestr.c')
0 files changed, 0 insertions, 0 deletions