Subject: bug#66113: Apply the entire diff buffer

From: Juri Linkov <[email-masked]>
Date: Wed, 27 Sep 2023 20:36:49 +0300

close 66113 30.0.50
thanks

>>                          ;; In git format-patch "^-- $" signifies
>>                          ;; the end of the patch.
>> 			(and (eq diff-buffer-type 'git)
>> 			     (looking-at "^-- $"))
>> So I just copied this code here:
>
> That works. Thanks!

Actually this doesn't work for bzr that has a bug that adds
an extra line at the end.  So I pushed a better fix.

> Ideally, I think point would move to the first failing hunk. But that's not
> urgent, could be a TODO for later.

There are many variants what would be better to do here.
Maybe also to show all failing hunks.  And leaving point
at the beginning also makes sense, because then the user
could start applying hunks one by one with 'C-c C-a'
from the beginning until encountering the failing hunk
and handle it manually.

> Aside from that, I'm still not crazy about the binding. But that's not
> a technical issue.

Agreed, the key binding is the best among bad variants.