threads / discuss / 59679

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

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

## tl;dr

One message between May 1, 2023 and May 1, 2023.

replies: 0people: 1as markdown or json

Britton Kerin· May 1, 2023, 19:21 UTC · lore
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

← back to recent threads