From: Junio C Hamano <gitster@pobox.com>
To: Paul Millar <paul.millar@desy.de>
Cc: git@vger.kernel.org
Subject: Re: bug with git describe --dirty --broken
Date: Fri, 21 Jun 2024 10:31:38 -0700 [thread overview]
Message-ID: <xmqqmsnemccl.fsf@gitster.g> (raw)
In-Reply-To: <c4f5ae01-97fe-4e3a-94e2-72da75b9df83@desy.de> (Paul Millar's message of "Fri, 21 Jun 2024 14:07:26 +0200")
Paul Millar <paul.millar@desy.de> writes:
> Hi Junio,
>
> Thanks for your quick reply.
>
>> 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.
>
>> 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 ;-)
prev parent reply other threads:[~2024-06-21 17:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 11:14 bug with git describe --dirty --broken Paul Millar
2024-06-20 16:57 ` Junio C Hamano
2024-06-21 12:07 ` Paul Millar
2024-06-21 17:31 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmsnemccl.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=paul.millar@desy.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.