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-geb44efaaBut 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