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

git-submodule docs for status command should mention --all option to git describe

From
Britton Kerin <britton.kerin@gmail.com>
Date
May 1, 2023, 19:21 UTC
Message-ID
<CAC4O8c9Q4oPP+RgVuOHfz9G8+3v5rDHMXoM_QJvArQGVWSHu-g@mail.gmail.com>
The docs currently say:
     status [--cached] [--recursive] [--] [<path>…]
     Show the status of the submodules. This will print the SHA-1 of
the currently checked out
     commit for each submodule, along with the submodule path and the
output of git describe for
     the SHA-1.

It took some guessing to figure out that it's actually the output of git describe --all for the SHA-1.

git describe alone says e.g.:
     fatal: No annotated tags can describe
'eb44efaaedcca34fc43c451f5659ec2e80bb2bbc'.
     However, there were unannotated tags: try --tags.
So I tried that:
     $ git describe eb44efaaedcca34fc43c451f5659ec2e80bb2bbc --tags
     v0.4.0-devel3-14-geb44efaa
But that's also not what git submodule status shows in my case:
     $ git submodule status
     04bd93953af4d0f624a5103a8ac29caa4d0c64c4 contrib (heads/master)

If I understand correctly git describe will never find heads/ refs (barring pathological names) without --all, so it seems that it would be best to short-circuit the above fun by including the --all flag in the above documentation paragraph.

Britton
Message 1 of 1 in “git-submodule docs for status command should mention --all option to git describe”
  1. Britton KerinMay 1, 2023

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.