git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: ps/receive-use-only-advertised

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 18, 2022, 23:27 UTC
Message-ID
<xmqqmt8nkfmx.fsf@gitster.g>
In-Reply-To
<Y3PMLFuvR6hlIzbq@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 19 quoted lines
>> > >  "git receive-pack" used to use all the local refs as the boundary
>> > >  for checking connectivity of the data "git push" sent, but now it
>> > >  uses only the refs that it advertised to the pusher.  In a
>> > >  repository with the .hideRefs configuration, this reduces the
>> > >  resource needed to perform the check, and also forces the pusher to
>> > >  prove they have all objects that are necessary to complete the
>> > >  history on top of only the history available to them.
>> >
>> > We have at a later point established that this is not true: the pusher
>> > does not have to prove they have all objects. As the `--not --all` part
>> > in git-rev-list(1) is merely an optimization the semantics aren't
>> > changed at all
>> 
>> Thanks; this is Junio's description from when he picked up the topic
>> back in WC #08 from October. I'll need to update before graduating it
>> down.
>
> Yeah, I think you can probably just remove everything from "and also
> forces..." on.

Hmph, --not --all is a way to make the rev-list error out if the proposed new tips are not connected with existing objects to the "existing" refs, and I thought that removing "hidden" ones from "--all" means that the pusher is now forced to push objects all needed. But you are right. Excluding the hidden refs from "--all" while doing the "rev-list new-tip --not --all" traversal does not exclude pre-existing objects that are only reachable from these hidden refs in the object store, so it does not help ensure that the pusher has to prove they have these objects.

Previous: Taylor BlauNext: Ævar Arnfjörð Bjarmason
Message 8 of 17 in “What's cooking in git.git (Nov 2022, #03; Mon, 14)”
  1. Taylor BlauNov 15, 2022
  2. Eric SunshineNov 15, 2022
  3. Taylor BlauNov 15, 2022
  4. Patrick SteinhardtNov 15, 2022
  5. Taylor BlauNov 15, 2022
  6. Jeff KingNov 15, 2022
  7. Taylor BlauNov 16, 2022
  8. Junio C HamanoNov 18, 2022
  9. rp/maintenance-qol with 'make DEVELOPER=1' (was: What's cooking in git.git (Nov 2022, #03; Mon, 14))Ævar Arnfjörð Bjarmason, Nov 15, 2022
  10. ms/sendemail-validate-headers, was Re: What's cooking in git.git (Nov 2022, #03; Mon, 14)Johannes Schindelin, Nov 15, 2022
  11. Taylor BlauNov 16, 2022
  12. Strawbridge, MichaelNov 16, 2022
  13. Johannes SchindelinNov 18, 2022
  14. Eric SunshineNov 15, 2022
  15. Taylor BlauNov 16, 2022
  16. Elijah NewrenNov 16, 2022
  17. Taylor BlauNov 16, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.