bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Dmitry Gutov
Subject: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks
Date: Mon, 14 Feb 2022 00:37:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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".





reply via email to

[Prev in Thread] Current Thread [Next in Thread]