From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349) Date: Tue, 30 Aug 2022 19:20:58 +0300 Message-ID: <83y1v5u2hh.fsf@gnu.org> References: <166171593185.16640.41619657947456727@vcs2.savannah.gnu.org> <20220828194533.23A6BC00889@vcs2.savannah.gnu.org> <87r10znm0y.fsf@gnus.org> <83fshfvvyn.fsf@gnu.org> <83bks3vtf5.fsf@gnu.org> <83tu5uug68.fsf@gnu.org> <834jxtvqb3.fsf@gnu.org> <383e8f09-3c2c-2ac9-3aa8-074379f584a5@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, juri@jurta.org, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 30 19:01:50 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oT4cY-0007n7-7z for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 19:01:50 +0200 Original-Received: from localhost ([::1]:58816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT4cX-0005vj-72 for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Aug 2022 13:01:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT3yk-0005FP-Nu for emacs-devel@gnu.org; Tue, 30 Aug 2022 12:20:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34480) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT3yi-0002bz-FH; Tue, 30 Aug 2022 12:20:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HH3A3nMZrTGL1WAGUDuqSU3XvJmdKdP2oIDHSmqfW+Q=; b=qxpd5uj4ZvXg qBy4tQJU+QYrEQRlCp6JyJYZXf1DSUpSn+bntHQ58BcXQrKJgEYTamdEMJzKVDQyOFPIAGVOcQQk+ xSZu82HPY4CLFekeaDDr3voG9ARzkXg8xnoOBepSihfnZvTGj0NaAdqSu0lJxB9hw0wMHTVYbKV74 oC4JLTvrZC4JVPyOnMIdz+Z41Z9tpZG/r+CGYPfngTgYcdYabj3/fuhebBDBkn2fjDF4yHN6YZCfl uxUt27uefc1VMjTREguh99Gh3s2PflfBthQee9dM4T+TiUiHo+wusMQtHgraeMQfdpZzeN4nrG5dN DKHKL/1ODCXNA0xMwdo1Jw==; Original-Received: from [87.69.77.57] (port=4294 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT3yd-0000KO-I8; Tue, 30 Aug 2022 12:20:39 -0400 In-Reply-To: <383e8f09-3c2c-2ac9-3aa8-074379f584a5@yandex.ru> (message from Dmitry Gutov on Tue, 30 Aug 2022 16:52:10 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:294360 Archived-At: > Date: Tue, 30 Aug 2022 16:52:10 +0300 > Cc: larsi@gnus.org, juri@jurta.org, emacs-devel@gnu.org > From: Dmitry Gutov > > >> It's significant in that the starting conditions is that the files are > >> already modified compared to the repository head, and the end goal is to > >> be able to pick only some of those changes for commit. > > > > Ouch! Then this feature will be useless for me, and I'm sorry I > > wasted everyone's time based on the description in NEWS, which doesn't > > make a point of emphasizing this basic assumption. > > Perhaps we could make it more useful for you as well, e.g. by applying > all the changes from the patch first when called with 'C-u'. Alas, C-u already has a meaning with "C-x v v". > But I suppose if your patches apply cleanly most of the time, it can be > less of a problem. They do, when I choose them not to be rejected ;-) > diff-mode provides commands to delete hunks, split them, and even allows > one to edit individual characters (something that 'git add -p' doesn't > provide). So I'd argue this way might even be more powerful. >From my POV, a better UI would be to enter diff-mode _after_ the user invoked VC to commit the changes, but asked specifically to commit them selectively. Not the other way around. IOW, the process of generating the diffs buffer should be part of the command execution, not a prerequisite for it.