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

Cloning of submodule with --depth should follow the branch option

From
MZMikhail Zabaluev <mikhail.zabaluev@gmail.com>
Date
Nov 2, 2015, 07:55 UTC
Message-ID
<CAKUkx92jfjti4WGmeOHdXi2uCGTu0AifL23NzKCWg7n1vJZDmg@mail.gmail.com>
Hi,

I have an issue with git 2.4.3 when trying to limit the amount of data fetched when cloning submodules. The --depth option is useful, but when .gitmodules specifies a non-default branch, the submodule repository clone invocation (which is a single-branch clone due to --depth) fetches master regardless, and then checkout fails due to a nonexistent tree reference. I think it would be sensible in this case to pass --branch to the submodule clone command.

Here's a repository to exercise: https://github.com/gi-rust/gir
Best regards,
  Mikhail
Message 1 of 1 in “Cloning of submodule with --depth should follow the branch option”
  1. Mikhail ZabaluevNov 2, 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.