Subject: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks

From: Dmitry Gutov <[email-masked]>
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.