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: Wed, 8 Dec 2021 05:29:11 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

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.





reply via email to

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