From: Junio C Hamano <gitster@pobox.com>
To: Nicolas Pitre <nico@cam.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/4] make verify_one_pack() a bit less wrong wrt packed_git structure
Date: Fri, 29 Feb 2008 21:59:12 -0800 [thread overview]
Message-ID: <7vk5kn7znz.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 1204176320-31358-3-git-send-email-nico@cam.org
Nicolas Pitre <nico@cam.org> writes:
> ..., but it is still
> a bit more "correct" to leak it implicitly rather than explicitly.
I do not follow this logic to debate which incorrectness is more
correct, but I do not mind the removal of free() there.
I am not sure about the install_packed_git() piece, though.
This part of the code predates Shawn's windowed mmap and all
other recent code improvements, but the original motivation of
not installing the pack was to make sure that codepaths outside
verify_packfile() would not see the objects from the pack being
verified at all. IOW, the omission originally was intentional.
I just quickly looked at verify_packfile() after applying your
series, and it seems that nothing tries to access objects with
only their SHA-1 names without explicitly telling which pack to
read from, so it should still be safe even if we did not install
the packed git (iow, the normal codepath would not try to pick
up objects from the suspect pack that is being validated).
But it made me feel a bit worried.
next prev parent reply other threads:[~2008-03-01 5:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-28 5:25 [PATCH 0/4] enhancements to 'git verify-pack' Nicolas Pitre
2008-02-28 5:25 ` [PATCH 1/4] factorize revindex code out of builtin-pack-objects.c Nicolas Pitre
2008-02-28 5:25 ` [PATCH 2/4] make verify_one_pack() a bit less wrong wrt packed_git structure Nicolas Pitre
2008-02-28 5:25 ` [PATCH 3/4] fix unimplemented packed_object_info_detail() features Nicolas Pitre
2008-02-28 5:25 ` [PATCH 4/4] add storage size output to 'git verify-pack -v' Nicolas Pitre
2008-03-01 5:59 ` Junio C Hamano [this message]
2008-03-01 8:18 ` [PATCH 2/4] make verify_one_pack() a bit less wrong wrt packed_git structure Nicolas Pitre
2008-03-01 20:25 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vk5kn7znz.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=nico@cam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).