Thread (1 message) 1 message, 1 author, 2024-06-21

Re: bug with git describe --dirty --broken

From: Junio C Hamano <hidden>
Date: 2024-06-21 17:31:44

Paul Millar [off-list ref] writes:
Hi Junio,

Thanks for your quick reply.
quoted
	if (broken) {
		run 'git diff-index' in a subprocess
		use the result from 'diff-index' unless the command
		aborted
	} else if (dirty) {
		refresh the index
		run the equivalent of 'diff-index' in-core
		use the result; if the in-core diff-index aborts,
		you are dead already.
	}
Great.

This matches my intuition from investigating this problem: the
--broken flag triggers a different code-path.  However, it's good to
have this confirmed.
quoted
I _think_ the "broken" codepath should be taught to also run "git
update-index --refresh" before it runs "git diff-index" (both in
their own subprocesses, or run in the same subprocess sequencially,
as if "git update-index --refresh && git diff-index" were run), and
your problem may disappear.
For what it's worth, I agree.

Also, just to mention it, fixing this problem isn't a priority (at
least, not for me).  Simply removing the --broken flag resolves the
problem and I can live without this functionality.
Thanks.  Let's mark it with #leftoverbits so that people who are
bored and looking for small and isolated things to do can work on it
on their ample spare time ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help