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

Previous Next

Package: emacs;

Reported by: Manuel Uberti <manuel.uberti <at> inventati.org>

Date: Tue, 7 Dec 2021 09:00:02 UTC

Severity: normal

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 52349 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>
Cc: Manuel Uberti <manuel.uberti <at> inventati.org>, 52349 <at> debbugs.gnu.org
Subject: Re: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks
Date: Wed, 8 Dec 2021 05:29:11 +0300
On 07.12.2021 22:06, Juri Linkov wrote:
> The problem is that 'git apply --cached' doesn't perform the merge
> with other changes in the same file, whereas 'git stash pop'
> merges committed changes with uncommitted changes.

This seems to address our previous discussion, rather than the 
difference vs. diff-hl.

Anyway, I don't know if it is a problem.

E.g., you might want to edit a diff (if you know how, which is a 
significant "if") to commit a slightly different change than what the 
current file contents show.

But then, I'm not sure you'll want the applied change to be reflected in 
the file on disk too (as opposed to being saved in the commit). I 
probably won't (and it would let us avoid the awkward step of seeing the 
stashing operation temporarily reflected in the file contents, as well 
as any possible conflicts).

Either way, the editing of the diff that's more complex than splitting 
hunks and deleting some of them will probably be very rare. So the 
behavior in this scenario doesn't have to affect our choice of 
implementation.




This bug report was last modified 2 years and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.