From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks Date: Tue, 07 Dec 2021 21:04:20 +0200 Organization: LINKOV.NET Message-ID: <86k0ggfd8r.fsf@mail.linkov.net> References: <268cee0d-465d-b862-d1d6-f5da4d69e737@inventati.org> <86r1aogxn5.fsf@mail.linkov.net> <73d90309-3e8b-f4ca-e237-f48e5d90fb31@inventati.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28086"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 52349@debbugs.gnu.org To: Manuel Uberti Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 07 20:14:18 2021 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 1mufup-00070N-GD for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 20:14:15 +0100 Original-Received: from localhost ([::1]:56362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mufuo-00020Z-0I for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 14:14:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mufuc-0001y4-8o for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 14:14:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mufub-00027U-SU for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 14:14:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mufub-0000E2-Jz for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2021 14:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Dec 2021 19:14: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.1638904421818 (code B ref 52349); Tue, 07 Dec 2021 19:14:01 +0000 Original-Received: (at 52349) by debbugs.gnu.org; 7 Dec 2021 19:13:41 +0000 Original-Received: from localhost ([127.0.0.1]:38660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mufuH-0000D8-BT for submit@debbugs.gnu.org; Tue, 07 Dec 2021 14:13:41 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:53533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mufuC-0000Co-8I for 52349@debbugs.gnu.org; Tue, 07 Dec 2021 14:13:40 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 9D2121C0012; Tue, 7 Dec 2021 19:13:28 +0000 (UTC) In-Reply-To: <73d90309-3e8b-f4ca-e237-f48e5d90fb31@inventati.org> (Manuel Uberti's message of "Tue, 7 Dec 2021 18:08:41 +0100") 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:221865 Archived-At: >> I tried to do what is described in the second part of >> https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00207.html >> Is this the same that you request here? > > It does look like the same approach. I was only thinking of staging > specific hunks, while you suggest killing them as well, which would be just > as useful I guess. > > My use-case is the following: I often do different changes to a file (or in > a project) and it may happen that I have to stage, commit, and push just > some of them, while keep working on the others. If this matches your > proposal somehow, then we are saying the same thing indeed. This is exactly my use case as well: when some parts of the file are not yet ready to commit, then these hunks can be deleted from the output of 'C-x v D'. Then the remaining patch in the *vc-diff* buffer could be committed after temporarily moving all file changes into the stash. After committing the selected changes, the stash should be returned back by using `stash pop`.