From: Junio C Hamano <gitster@pobox.com>
To: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Cc: Frank Lichtenheld <frank@lichtenheld.de>, git@vger.kernel.org
Subject: Re: [PATCH] Fix "unpack-objects --strict"
Date: Thu, 13 Aug 2009 23:32:59 -0700 [thread overview]
Message-ID: <7vocqiucpw.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20090814060307.GA31721@auto.tuwien.ac.at> (Martin Koegler's message of "Fri\, 14 Aug 2009 08\:03\:07 +0200")
Martin Koegler <mkoegler@auto.tuwien.ac.at> writes:
> To introduce a object with one of its linked objects missing, left it
> out of the pack and push it into the repository. unpack-objects will
> unpack all objects and fail updating the ref (but leave all objects in
> the repository). As second step, simply send a ref update request,
> which should succed, as the object is present in the repository.
Your "ref update request" exploit does not work because your understanding
of how we decide to allow updating a ref is flawed.
We do not blindly update a ref to a commit only because we happen to have
that commit. We require that commit to reach existing tips of refs
without break. The logic is in quickfetch() in builtin-fetch.c.
This stronger validation is necessary to deal with any failed transfer by
http walkers, so it is nothing unusual nor new. They walk from the latest
commits that exist on the other side, and their object transfer can be
interrupted before they transfer enough older commits to make the history
connected with what we already had. In such a case we obviously do not
update any ref. And when we re-run the same request, we do not say "Ah,
we have the tip in the object database, so we will update the ref to it".
That is why I said requiring connectivity is a good idea, but keeping them
in core is a misguided waste of memory.
next prev parent reply other threads:[~2009-08-14 6:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-13 10:32 [BUG] Submodules problem with subdirectories and pushing Frank Lichtenheld
2009-08-13 11:19 ` Frank Lichtenheld
2009-08-13 19:33 ` [PATCH] Fix "unpack-objects --strict" Junio C Hamano
2009-08-14 6:03 ` Martin Koegler
2009-08-14 6:32 ` Junio C Hamano [this message]
2009-08-14 7:19 ` Martin Koegler
2009-08-14 7:31 ` Junio C Hamano
2009-08-14 7:41 ` Junio C Hamano
2009-08-14 9:30 ` Frank Lichtenheld
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=7vocqiucpw.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=frank@lichtenheld.de \
--cc=git@vger.kernel.org \
--cc=mkoegler@auto.tuwien.ac.at \
/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