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

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

On 13.02.2022 03:32, Dmitry Gutov wrote:
>> But changing the established API with a new argument doesn't look right.
> 
> We could make sure to call the function with the current number of 
> arguments when a patch-buffer is not used, and with the additional one 
> when it is used. Which would automatically force an abort when a backend 
> does not support this feature.

Another solution for making sure the current backend supports the new 
feature is to add a new backend function. Call it 'checkin-patch' or 
`checkin-diff`.

vc-git-checkin and vc-git-checking patch can share some implementation, 
so most of code duplication can be avoided.

But when a backend does not support this, the user will see a 
more-or-less understandable error like "not supported".