Subject: bug#72556: 29.1.90; vc-diff does not undo hunk in end of source file

From: Tomas Nordin <[email-masked]>
Date: Sun, 15 Sep 2024 10:41:45 +0000

Dmitry Gutov <[email-masked]> writes:

> Hi!
>
> On 10/08/2024 15:11, Tomas Nordin wrote:
>> I have
>> noticed that if the diff hunk is an addition in the end of the source
>> file, I dont get the expected question if I want to undo the hunk.
>> Instead, the hunk is applied again.
>
> No matter the resolution of this bug, just wanted to make sure you know 
> that you can force the reverse direction by adding the prefix to the 
> command.
>
> So while 'C-c C-a' applies the hunk, 'C-u C-c C-a' reverses it (with a 
> similar check that sees whether the hunk has been applied already).

I was loosely aware of that but never got it into my fingers. Instead I
was relying on that dwim behavior of diff-mode. But trying the prefix
variant out, it seems to be a solid way of "un-applying" a hunk.

Might not be worth the trouble to try and fix this problem if it is
complicated. There is a solid way to do what I want (which is maybe the
proper way), and my complaint about this is the only one I have seen. A
wont-fix is fine with me.