sha1_file.c: "legacy" is really the current format
commitcc5c54e78b18c2edc42228c06dab22002fa304fa
authorJunio C Hamano <gitster@pobox.com>
Wed, 8 Jun 2011 18:29:01 +0000 (8 11:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Jun 2011 23:39:33 +0000 (8 16:39 -0700)
tree26200547c5f66db4c77116f6551830ea2af6f784
parent6a7f71d376becc1a5b0357b682dd0c20842104b0
sha1_file.c: "legacy" is really the current format

Every time I look at the read-loose-object codepath, legacy_loose_object()
function makes my brain go through mental contortion. When we were playing
with the experimental loose object format, it may have made sense to call
the traditional format "legacy", in the hope that the experimental one
will some day replace it to become official, but it never happened.

This renames the function (and negates its return value) to detect if we
are looking at the experimental format, and move the code around in its
caller which used to do "if we are looing at legacy, do this special case,
otherwise the normal case is this". The codepath to read from the loose
objects in experimental format is the "unlikely" case.

Someday after Git 2.0, we should drop the support of this format.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c