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, 04:45 UTC
Message-ID
<20141202044522.GZ6527@google.com>
In-Reply-To
<CAGyf7-GZbRBN4O_yNgrmJCya=6f8XQ4O8m7WBa1k8Ve196ajYQ@mail.gmail.com>
Hi,
Bryan Turner wrote:
> The reason I ask is that there is a race condition that exists where
> the ref advertisement lists refs/heads/foo at abc1234, and then foo is
> deleted before the actual upload-pack request comes in.

Can you say more about the context? For example, was this actually happening, or is this for the sake of understanding the protocol better?

I ask because knowing the context might help us give more specific advice.

Sometimes when people delete a branch they really want those objects to be inaccessible *right away*. So for such people, git's behavior of failing the request unless the objects are still accessible by some other path is helpful.

A stateful server could theoretically cache the list of objects they have advertised for a short time, to avoid clients having to suffer when something becomes inaccessible during the window between the upload-pack advertisement and upload-pack request. Or a permissive server can allow all wants except a specific blacklist (and some people do that).

Jonathan
Previous: Bryan TurnerNext: Bryan Turner
Message 5 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.