From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks Date: Mon, 14 Feb 2022 00:37:03 +0200 Message-ID: References: <268cee0d-465d-b862-d1d6-f5da4d69e737@inventati.org> <9106387a-98cf-396f-bf45-ccb04581787b@yandex.ru> <864k7kfd56.fsf@mail.linkov.net> <86fsr3uen2.fsf@mail.linkov.net> <95d2d999-49ad-13c4-9f25-0935650a1e42@yandex.ru> <8635ktjfll.fsf@mail.linkov.net> <36b963e4-5af7-dd9e-af92-4404541b9f4d@yandex.ru> <86v8xjx45h.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36321"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: 52349@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 13 23:38:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJNVY-0009LJ-SC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 23:38:16 +0100 Original-Received: from localhost ([::1]:38038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJNVX-0005er-G9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Feb 2022 17:38:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJNVK-0005ei-6y for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 17:38:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJNVJ-0001pf-UF for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 17:38:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJNVJ-0006bW-PG for bug-gnu-emacs@gnu.org; Sun, 13 Feb 2022 17:38:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Feb 2022 22:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52349 X-GNU-PR-Package: emacs Original-Received: via spool by 52349-submit@debbugs.gnu.org id=B52349.164479183525329 (code B ref 52349); Sun, 13 Feb 2022 22:38:01 +0000 Original-Received: (at 52349) by debbugs.gnu.org; 13 Feb 2022 22:37:15 +0000 Original-Received: from localhost ([127.0.0.1]:39111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJNUZ-0006aT-0f for submit@debbugs.gnu.org; Sun, 13 Feb 2022 17:37:15 -0500 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:37455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJNUV-0006aD-S5 for 52349@debbugs.gnu.org; Sun, 13 Feb 2022 17:37:13 -0500 Original-Received: by mail-wr1-f53.google.com with SMTP id w11so24063516wra.4 for <52349@debbugs.gnu.org>; Sun, 13 Feb 2022 14:37:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=ITorDO8p6ancGJNnQXhPB3O6WjW3ew2vOAqEaoQ8JgM=; b=NzFPY4H9YuwVt/LUq/AIqJ58t6sPPmhk6UMH1FQ4Uj6d9LcLMsrJ/hVkjQPjY2Oet4 eGTN/5NZifmYqE9ImsONGID5UbQ2+HUm9rGrrPllIR5RBMR5Tcxe0P3jEjngLvP4PYOJ B11vy9PaSykAMSDkBAUpGCdlM8WvWxHrzJB/2P7XEtD73hQ8Sl1OdCSDzRm+x1vsTgod IWfP2CV9fGj/e29kxTJvtsB/ITHeiPm6QZxW4Aj9SyBwyVXvt55u1INrIB1VwUKx5Ial /nGporY00IksGnTCYWf/OHVYnlTyNoGJgLVj0UIrHGydKl38jeXk8CNtx1kF0Jqlj7Lc QnXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=ITorDO8p6ancGJNnQXhPB3O6WjW3ew2vOAqEaoQ8JgM=; b=h1/wZ6B6z339bmBguti/lVadevS8X669diScfBqsFhs1UiC7Rt60eCjmDnY+834rAB qEHXkuynT4pyHMTwpvA1c13/gJP5c2HoxPcwfui3huxKB7uQCiN5gsHvj498zWWxfHHF EinoFWmlvT7nXvOdktT1Elr4RYjtP/qk+bZsHf6p9so6pfW2LdSQaoe0spFJbbJok78A dojAVSmtYQGeSA5pBVDwlAJH9Y2fOMDv1SPAiwMABdN4T9yk9z1EzVuIjXCDqxCxqak8 VNPlIJNVQdk0/ahs3Vu3HyZyXO6GY8zfVZAbqm+UOf79/XbZYOeUa6aLI4W30+8oLSxO E/CA== X-Gm-Message-State: AOAM532PjOduTBTC8lRb99EgaEniIYi9jAjnrmAuPOipj4NcoGxB4/5K mWa9GmyNDpAW8HxFMYJ1Fk4= X-Google-Smtp-Source: ABdhPJxLUC1ANQHsnbG1GVZYOzXMxxTW0QUv5zwFV4Y7f6Pzz8n7gJs0z3u24WWJ/u1zIRZfcwa3xw== X-Received: by 2002:a5d:560c:: with SMTP id l12mr9297743wrv.647.1644791825849; Sun, 13 Feb 2022 14:37:05 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id az2sm15386000wmb.2.2022.02.13.14.37.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Feb 2022 14:37:05 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226843 Archived-At: 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".