Code

read_sha1_file(): report correct name of packfile with a corrupt object
authorJunio C Hamano <gitster@pobox.com>
Thu, 28 Oct 2010 18:13:06 +0000 (11:13 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Nov 2010 16:24:47 +0000 (09:24 -0700)
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>

No differences found