|
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: | Wed, 31 Aug 2022 21:02:01 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 31.08.2022 19:39, Lars Ingebrigtsen wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:I don't use stashing commands from VC myself, but the stash mechanism is usually more complex, e.g. it usually knows how to merge changes (when the user has edited the file in some place and then pops the stash) and indicate conflicts. That's why a stash is usually represented as a diff, I guess.Yes. But I think you could just do that here, too? I.e., instead of copying and managing files, you can just write the `C-x v D' diff to a file, apply reverted diff, apply user-edited patch, commit, reverse edited patch, apply diff from file.
If you like, I can take this route as well. It seems a bit more error-prone, though: some unknown bug in diff-apply-hunk might make it fail at the end, or even corrupt the file contents silently.
'cp' seems more bullet-proof in that regard.
It seems easier, even -- you don't have to manage a bunch of files.
True.
[Prev in Thread] | Current Thread | [Next in Thread] |