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

Re: http-protocol question

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 2, 2014, 05:17 UTC
Message-ID
<20141202051755.GA6527@google.com>
In-Reply-To
<CAGyf7-Gx1VU-1OicCHG0sStUnNXy_0Y8VYUP+PZjpN6nz7dTrw@mail.gmail.com>
Bryan Turner wrote:
> I ask because it's actually happening. Heavy CI load sometimes has
> builds fail because git clone dies with "not our ref". That's the
> specific context I'm working to try and address right now.
Thanks --- that makes sense.
Show 6 quoted lines
>                                                            Some teams
> use rebase-heavy workflows, which also evades the check_non_tip easing
> and fails with "not our ref", so I can't be 100% certain it's ref
> deletion in specific causing it (but I guess which of those it is is
> probably largely academic; as long as hosting spans multiple requests
> it seems like this type of race condition is unavoidable).

Yeah, everything mentioned before about ref deletion also applies to non-fast-forward updates.

> I'm trying to decide if there is something I can enable or tune to
> prevent it, and the type of twilighting hinted at by the http-protocol
> documentation seemed like it could be just the thing.

If you control the side that clones, then just cloning the single branch you are building (with --single-branch and -b) can help.

Using a bidirectional protocol like git:// or ssh:// (where the ref advertisement and check of wants happen in the same connection) would avoid the problem we're talking about.

On the server side, I agree that either mining reflogs or storing advertisements to disk would be a nice way to take care of this. No one has implemented either of those, but it would be a nice setting to have. :)

Thanks, Jonathan

Previous: Bryan TurnerNext: Duy Nguyen
Message 7 of 14 in “http-protocol question”
  1. Bryan TurnerDec 2, 2014
  2. Jonathan NiederDec 2, 2014
  3. Bryan TurnerDec 2, 2014
  4. Bryan TurnerDec 2, 2014
  5. Jonathan NiederDec 2, 2014
  6. Bryan TurnerDec 2, 2014
  7. Jonathan NiederDec 2, 2014
  8. Duy NguyenDec 2, 2014
  9. Duy NguyenDec 2, 2014
  10. Jeff KingDec 2, 2014
  11. Bryan TurnerDec 2, 2014
  12. Jeff KingDec 2, 2014
  13. Junio C HamanoDec 2, 2014
  14. Jeff KingDec 2, 2014

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.