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

Re: Multiple fetches when unshallowing a shallow clone

From
Duy Nguyen <pclouds@gmail.com>
Date
Dec 7, 2015, 21:21 UTC
Message-ID
<CACsJy8CQx-jL0aWW4mpGopNQtdJV7+8YCy2SzVL=VJSbBKAwMg@mail.gmail.com>
In-Reply-To
<CACs8u9RzUVWw2Ld1K7JeO7Eci114JEiML8bbGy96m4pZZk=FnA@mail.gmail.com>
On Mon, Dec 7, 2015 at 8:57 PM, Jason Paller-Rzepka <jasonpr@google.com> wrote:
> Duy, you mentioned that depth=0 means "do not change depth".  I assume that
> means the server should use exactly the shallows that the client sent, and
> it does not need to traverse the tree or modify the shallow or unshallow
> sets at all.  Right?

Correct. The server might send new shallow lines anyway though, if the server repo is also shallow and the new fetched ref needs to be cut. But I don't know if Dulwich supports that yet.

Show 5 quoted lines
> Duy, you also mentioned that "those lines should be rejected any way".  You
> just mean that a "deepen 0" line should be rejected, right? And that's
> because the right way to tell git-upload-pack not to change the depth is to
> omit the "deepen" line after the "shallow" lines, so there's never a need to
> send "deepen 0"?

Also correct. I didn't check the code when I wrote that. But I have checked and upload-pack does reject "deepen 0"

if (starts_with(line, "deepen ")) {
   char *end;
   depth = strtol(line + 7, &end, 0);
   if (end == line + 7 || depth <= 0)
      die("Invalid deepen: %s", line);
-- 
Duy
Previous: Jeff King
Message 19 of 19 in “Multiple fetches when unshallowing a shallow clone”
  1. Jason Paller-RzepkaNov 30, 2015
  2. Stefan BellerDec 4, 2015
  3. Jeff KingDec 4, 2015
  4. Stefan BellerDec 4, 2015
  5. Jason Paller-RzepkaDec 4, 2015
  6. Stefan BellerDec 4, 2015
  7. Jeff KingDec 4, 2015
  8. Junio C HamanoDec 4, 2015
  9. Duy NguyenDec 5, 2015
  10. Junio C HamanoDec 6, 2015
  11. Jeff KingDec 6, 2015
  12. Jeff KingDec 6, 2015
  13. Duy NguyenDec 6, 2015
  14. Jason Paller-RzepkaDec 7, 2015
  15. Junio C HamanoDec 7, 2015
  16. Jeff KingDec 7, 2015
  17. Junio C HamanoDec 4, 2015
  18. Jeff KingDec 4, 2015
  19. Duy NguyenDec 7, 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.