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

Possible regression in master? (submodules without a "master" branch)

From
Johan Herland <johan@herland.net>
Date
Mar 27, 2014, 14:21 UTC
Message-ID
<CALKQrgeRJRoyC-UV7J98U1qQfqEFr_H1sEfAWd0GbstZagUisw@mail.gmail.com>
Hi,

I just found a failure to checkout a project with submodules where there is no explicit submodule branch configuration, and the submodules happen to not have a "master" branch:

  git clone git://gitorious.org/qt/qt5.git qt5
  cd qt5
  git submodule init qtbase
  git submodule update
In current master, the last command fails with the following output:
  Cloning into 'qtbase'...
  remote: Counting objects: 267400, done.
  remote: Compressing objects: 100% (61070/61070), done.
  remote: Total 267400 (delta 210431), reused 258876 (delta 202642)
  Receiving objects: 100% (267400/267400), 136.23 MiB | 6.73 MiB/s, done.
  Resolving deltas: 100% (210431/210431), done.
  Checking connectivity... done.
  error: pathspec 'origin/master' did not match any file(s) known to git.
  Unable to setup cloned submodule 'qtbase'

Bisection points to 23d25e48f5ead73c9ce233986f90791abec9f1e8 (W. Trevor King: submodule: explicit local branch creation in module_clone). Looking at the patch, it seems to introduce an implicit assumption on the submodule origin having a "master" branch. Is this an intended change in behaviour?

...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Next: W. Trevor King
Message 1 of 29 in “Possible regression in master? (submodules without a "master" branch)”
  1. Johan HerlandMar 27, 2014
  2. W. Trevor KingMar 27, 2014
  3. W. Trevor KingMar 27, 2014
  4. Jens LehmannMar 27, 2014
  5. Junio C HamanoMar 27, 2014
  6. Jens LehmannMar 27, 2014
  7. Johan HerlandMar 27, 2014
  8. W. Trevor KingMar 28, 2014
  9. Junio C HamanoMar 27, 2014
  10. Jens LehmannMar 27, 2014
  11. W. Trevor KingMar 27, 2014
  12. Junio C HamanoMar 27, 2014
  13. Heiko VoigtMar 27, 2014
  14. Jens LehmannMar 27, 2014
  15. Johan HerlandMar 27, 2014
  16. W. Trevor KingMar 28, 2014
  17. [RFC] submodule: change submodule.<name>.branch default from master to HEADW. Trevor King, Mar 28, 2014
  18. Eric SunshineMar 28, 2014
  19. W. Trevor KingMar 28, 2014
  20. W. Trevor KingMar 28, 2014
  21. Jens LehmannMar 28, 2014
  22. W. Trevor KingMar 28, 2014
  23. Jens LehmannMar 31, 2014
  24. Junio C HamanoMar 28, 2014
  25. Jens LehmannMar 31, 2014
  26. W. Trevor KingMar 31, 2014
  27. Junio C HamanoMar 31, 2014
  28. submodule.<path>.branch vs. submodule.<name>.branch (was: Possible regression in master? (submodules without a "master" branch).W. Trevor King, Mar 27, 2014
  29. Junio C HamanoMar 27, 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.