emacs-devel
[Top][All Lists]
Advanced

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

Re: On the adoption of transient.el


From: Juri Linkov
Subject: Re: On the adoption of transient.el
Date: Wed, 11 Aug 2021 09:58:41 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>>> - Let the user edit a diff in the diff-mode buffer
>>> - Save it to a file
>>> - 'git apply --cached', to put the contents to the staging area
>>> - 'git commit'
>> But these commands don't perform a merge when committing a patch
>> with changes in the same file.  So afterwards `git diff` will show
>> the reversed diff for already committed changes.
>
> Sorry, I don't understand. Could you explain the scenario in more detail?

This is the shortest test case:

1. make changes in one part of a file
2. create a patch with changes in another part of the same file
3. git apply --cached a.patch
4. git commit -m "Apply a.patch"
5. git commit -a -m "Commit original file changes"

The last commit reverts the changes committed from the patch.



reply via email to

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