Closed simonmichael closed 3 years ago
PS in my git version (2.30.2) there are two other flags which might be of interest. I thought about adding them but didn't; just FYI:
`--dirty': If the working tree has local modification "-dirty" is appended to it. If a repository is corrupt and Git cannot determine if there is local modification, Git will error out, unless `--broken' is given, which appends the suffix "-broken" instead.
Correction: just the --broken
flag would be needed; it adds "-dirty" when there are uncommitted changes or "-broken" when the repo is somehow corrupt.
LGTM. Can you add a minor version bump and changelog entry explaining the change? Thanks!
Done, and a fix making tests more robust.
Thanks!
I want to always show the git revision in --version output, including for released versions. Hopefully others do as well, so that hard coding this is ok.
Unfortunately I don't know which git versions support
--long
, but githash doesn't discuss git version and I'm guessing the flag has been around a long time, so I haven't looked further.Thanks for githash!