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

Re: [PATCH 0/5] not making corruption worse

From
Jeff King <peff@peff.net>
Date
Mar 18, 2015, 10:21 UTC
Message-ID
<20150318102108.GA27249@peff.net>
In-Reply-To
<xmqqh9tjme0l.fsf@gitster.dls.corp.google.com>
On Tue, Mar 17, 2015 at 03:54:02PM -0700, Junio C Hamano wrote:
Show 16 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > But it strikes me as weird that we consider the _tips_ of history to be
> > special for ignoring breakage. If the tip of "bar" is broken, we omit
> > it. But if the tip is fine, and there's breakage three commits down in
> > the history, then doing a clone is going to fail horribly, as
> > pack-objects realizes it can't generate the pack. So in practice, I'm
> > not sure how much you're buying with the "don't mention broken refs"
> > code.
> 
> I think this is a trade-off between strictness and convenience.  Is
> it preferrable that every time you try to clone a repository you get
> reminded that one of its refs point at a bogus object and you
> instead have to do "git fetch $there" with a refspec that excludes
> the broken one, or is it OK to allow clones and fetches silently
> succeed as if nothing is broken?

I think the real issue is that we do not know on the server side what the client wants. Is it "tell me the refs, so I can grab just the one I need, and I don't care about the broken ones"? Or is it "I want everything you have, and tell me if you can't serve it"? You want strictness in the latter case, but not in the former. But if we were to err on the side of strictness, you could not do the former at all (because upload-pack would barf before the client even has a chance to say anything).

I'm not sure if anyone will actually find GIT_REF_PARANOIA useful for something like that or not. As an environment variable, it may impact a filesystem-local clone, but it would not travel across a TCP connection. And doing so is tough, because the ref advertisement happens before the client speaks.

If we ever have a client-speaks-first protocol, one extension could allow the client to flip the paranoia switch on the server. But my main goal here was really just making "prune" safer, so I'm happy enough with what this series does, for now.

Show 5 quoted lines
> In some parts of the system there is a movement to make this trade
> off tweakable (hint: what happened to the knobs to fsck that allow
> certain kinds of broken objects in the object store?  did the topic
> go anywhere?). This one so far lacked such a knob to tweak, and I
> view your paranoia bit as such a knob.

I think I promised several times to review that topic and never got around to it. Which makes me a bad person. It is still on my todo list.

-Peff
Previous: Junio C Hamano
Message 35 of 35 in “not making corruption worse”
  1. 0/5 not making corruption worseJeff King, Mar 17, 2015
  2. 1/5 t5312: test object deletion code paths in a corrupted repositoryJeff King, Mar 17, 2015
  3. Johannes SixtMar 17, 2015
  4. Jeff KingMar 17, 2015
  5. Johannes SixtMar 18, 2015
  6. Junio C HamanoMar 19, 2015
  7. Jeff KingMar 19, 2015
  8. Junio C HamanoMar 19, 2015
  9. Jeff KingMar 19, 2015
  10. Junio C HamanoMar 19, 2015
  11. Jeff KingMar 19, 2015
  12. Eric SunshineMar 20, 2015
  13. Jeff KingMar 20, 2015
  14. Eric SunshineMar 20, 2015
  15. test &&-chain lint (was: [PATCH 1/5] t5312: test object deletion code paths in a corrupted repository)Jeff King, Mar 20, 2015
  16. Jeff KingMar 20, 2015
  17. Jeff KingMar 20, 2015
  18. Eric SunshineMar 20, 2015
  19. Junio C HamanoMar 20, 2015
  20. Junio C HamanoMar 20, 2015
  21. Jeff KingMar 20, 2015
  22. Junio C HamanoMar 20, 2015
  23. Jeff KingMar 20, 2015
  24. 2/5 refs: introduce a "ref paranoia" flagJeff King, Mar 17, 2015
  25. Junio C HamanoMar 19, 2015
  26. Jeff KingMar 19, 2015
  27. Junio C HamanoMar 19, 2015
  28. Jeff KingMar 19, 2015
  29. 3/5 prune: turn on ref_paranoia flagJeff King, Mar 17, 2015
  30. 4/5 repack: turn on "ref paranoia" when doing a destructive repackJeff King, Mar 17, 2015
  31. 5/5 refs.c: drop curate_packed_refsJeff King, Mar 17, 2015
  32. Eric SunshineMar 20, 2015
  33. Jeff KingMar 17, 2015
  34. Junio C HamanoMar 17, 2015
  35. Jeff KingMar 18, 2015

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.