Subject: bug#68183: 28.3; vc-dir fails when I have a certain branch checked out

From: Kévin Le Gouguec <[email-masked]>
Date: Thu, 08 Aug 2024 09:07:43 +0200

Sean Whitton <[email-masked]> writes:

>> About patch #2, CC'ing Sean Whitton for perspective on
>> vc-git--cmds-in-progress: I was puzzled by the function supporting many
>> commands (rebase, am, merge, bisect), whereas AFAICT its sole user only
>> heeds 'bisect & 'rebase.  Wondering if I've missed other in-tree uses,
>> or if we should add headers for 'am and 'merge, "while in there".
>
> I have some WIP which uses this function for some other purposes.
> It's a pretty cleanly identifiable piece of functionality so I would
> like to keep it separate.

Gotcha, thanks for weighing in!  Then I'll work on another revision of
the series to keep that function intact.

> I would be happy if you were to add detecting some other operations
> there, for sure, if you are confident in your detection methods.

Do you mean that the detection methods for 'am and 'merge currently in
place…

    (when (file-exists-p
	   (expand-file-name "rebase-apply/applying" gitdir))
      (push 'am cmds))
    (when (file-exists-p (expand-file-name "MERGE_HEAD" gitdir))
      (push 'merge cmds))

… are unreliable somehow?  I wasn't planning on detecting more
operations, merely adding vc-dir headers for these two, since despite
vc-git--cmds-in-progress picking these operations up,
vc-git-dir-extra-headers ignores them 😶