Subject: Re: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks

From: Dmitry Gutov <[email-masked]>
Date: Mon, 14 Feb 2022 00:41:04 +0200

On 13.02.2022 21:56, Juri Linkov wrote:
>> I suppose 'vc-diff-patch' could use a different buffer name than
>> "*vc-diff*" and thus avoid reusing that buffer?
>>
>> If it brings other problems somehow, oh well. An old bug is something we
>> can live with.
> Indeed, other buffer names might break user configuration.
> 
>> But also note that if the patch string was passed as an argument to the
>> backend action, this problem might be avoided as well.
> I can't imagine how the problem might be avoided using an argument.
> The problem is in these lines in vc-finish-logentry:
> 
>      (pop-to-buffer vc-parent-buffer)
>      ;; OK, do it to it
>      (save-excursion
>        (funcall log-operation
> 	       log-fileset
> 	       log-entry))
> 
> It expects to pop to the original buffer where vc-next-action was initiated.

OK, I see. Then I would try the other suggested option (using a 
different buffer name).

If you're sure it will cause problems, I'm not going to press the issue, 
but FWIW I don't have (or know of) any customizations that this would 
break. Worst case, people would end up adding an additional entry to 
display-buffer-alist. And maybe to some similar vars as well.

We could postpone solving this problem until later anyway, perhaps when 
someone complains. Or either of us gets bitten by it in practice.