[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a pa

From: Dmitry Gutov
Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349)
Date: Tue, 30 Aug 2022 20:33:13 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 30.08.2022 19:20, Eli Zaretskii wrote:
Date: Tue, 30 Aug 2022 16:52:10 +0300
Cc: larsi@gnus.org, juri@jurta.org, emacs-devel@gnu.org
From: Dmitry Gutov <dgutov@yandex.ru>

It's significant in that the starting conditions is that the files are
already modified compared to the repository head, and the end goal is to
be able to pick only some of those changes for commit.

Ouch!  Then this feature will be useless for me, and I'm sorry I
wasted everyone's time based on the description in NEWS, which doesn't
make a point of emphasizing this basic assumption.

Perhaps we could make it more useful for you as well, e.g. by applying
all the changes from the patch first when called with 'C-u'.

Alas, C-u already has a meaning with "C-x v v".

For better or worse, it doesn't seem to do anything in diff-mode buffers. But we could also use 'C-0'. Or something similar.

But I suppose if your patches apply cleanly most of the time, it can be
less of a problem.

They do, when I choose them not to be rejected ;-)


diff-mode provides commands to delete hunks, split them, and even allows
one to edit individual characters (something that 'git add -p' doesn't
provide). So I'd argue this way might even be more powerful.

 From my POV, a better UI would be to enter diff-mode _after_ the user
invoked VC to commit the changes, but asked specifically to commit
them selectively.  Not the other way around.  IOW, the process of
generating the diffs buffer should be part of the command execution,
not a prerequisite for it.

I suppose this UI could be implemented on top of the current behavior as well.

reply via email to

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