Add --untracked-is-dirty option to git describe

From: Ross Goldberg <hidden>
Date: 2025-01-05 12:12:29

Could you possibly add an option like --untracked-is-dirty to git
describe? (the name can obviously be changed to whatever you think is
best)

From what I gather, git describe --dirty[=<mark>] applies to deleted &
modified tracked files, regardless if the change is staged or not, but
only to new files if they are staged. If an untracked file that is not
ignored by git exists in the repo, it doesn't seem to trigger
--dirty[=<mark>]. Please let me know if my understanding is incorrect.

My proposed --untracked-is-dirty option would make untracked files
that aren't ignored by git trigger --dirty[=<mark>]. It would only be
valid if --dirty[=<mark>] has been specified. If you don't want to add
in a whole new option, you could have an alternate syntax for dirty
that activates this proposed behavior, maybe --dirty:[<mark>] (the =
has been replaced by a : to activate considering untracked non-ignored
files as dirty)

Are there any other categories of file statuses that someone might
want to be considered dirty? If so, then any solution should take them
into account, too.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help