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

From: Dmitry Gutov <[email-masked]>
Date: Sat, 10 Sep 2022 04:36:35 +0300

On 09.09.2022 01:48, Sean Whitton wrote:
> Would it be too disruptive to make "registering" a new file with Git a
> no-op, and then require the user to commit it by going to VC Dir and
> marking it?  That's the only alternative I can think of, given that it's
> common to have lots of untracked, unignored files around you don't
> intend ever to commit.

I suppose we could use a more complex check in Git's case: if the diff 
is non-empty, check that it doesn't intersect with the diff we want to 
apply, or where it does, the contents are exactly the same. It's more 
complex than the existing one-liner, though.

The commit-and-amend thick is the first that came to my mind too, but 
the above would be more flexible, I guess.

And as for dropping the "registering" step in Git, I suppose that might 
speed up the overall workflow for some people (myself included, 
probably), but it still wouldn't allow you to check in new files 
together with a partial diff in existing one. I think.