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

Re: Bug: git-upload-pack will return successfully even when it can't read all references

From
Jeff King <peff@peff.net>
Date
Sep 8, 2015, 22:06 UTC
Message-ID
<20150908220611.GE24159@sigill.intra.peff.net>
In-Reply-To
<CACBZZX6Ag5pjx_AhS_aN=rvJBcy+Nh+PXfdeEqxFdgxvL3NMbw@mail.gmail.com>
On Tue, Sep 08, 2015 at 02:16:03PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 9 quoted lines
> I wonder if --upload-pack="GIT_REF_PARANOIA=1 git-upload-pack" should
> be the default when running fetch if you have --prune enabled. There's
> a particularly bad edge case now where if you have permission errors
> on the master repository and run --prune on your backup along with a
> --mirror clone to mirror the refs, then when you have permission
> issues you'll prune everything from the backup.
> 
> But yeah, a proper fix needs protocol v2. Because among other things
> that --upload-pack hack will only work for ssh, not http.

Right. There is no real way to flip the flag from the client side, because we cannot reliably communicate it. Once we have such a mechanism, it might actually make sense to _always_ flip on paranoia. That is, we would rather an operation fail and be retried with in a "loose" mode explicitly. That's safer. It's less convenient when you have a broken repo, but surely that's the exception, right?

-Peff
Previous: Ævar Arnfjörð Bjarmason
Message 4 of 4 in “Bug: git-upload-pack will return successfully even when it can't read all references”
  1. Ævar Arnfjörð BjarmasonSep 7, 2015
  2. Jeff KingSep 8, 2015
  3. Ævar Arnfjörð BjarmasonSep 8, 2015
  4. Jeff KingSep 8, 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.