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: Sat, 10 Sep 2022 04:36:35 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

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.





reply via email to

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