[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:56:18 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> > (defun restore-source-file ()
> > (with-current-buffer (current-buffer)
> > (erase-buffer)
> > (insert-buffer "*diff-commit-hunk*")
> > (write-file (current-buffer-file-name)))
> > (remove-hook 'vc-checkin-hook 'restore-source-file))
>
> IIUC, it copies the old file back without merging changes in the same file.
>
> I'm not sure what you mean. What scenario are you thinking of? The
> "old file" is the one that contains any changes you are working with.
This is what I meant: when a file already contains some changes that should
not be committed, and some other changes need to be committed from a patch
in the same file (let's name these changesets as "old" and "new"), then
you save the old file contents temporarily, commit a patch with "new"
changes, and restore the old file contents. As a result, when you do
'C-x v =' (vc-diff) on such file, it will show the diff that includes
the already committed "new" changes, because these changes were never
merged to the old file.
> OTOH, `commit-patch` uses `interdiff` (for non-git VCSs)
> to compute differences between two changesets. Then vc
> could use something like your diff-commit-hunk.el
> for non-git VCSs to implement generic support for stash.
>
> What are commit-patch and interdiff? Since diff-commit-hunk.el works
> well for git (and really for any VCS), why have a different system
> there?
`interdiff` used by https://github.com/caldwell/commit-patch
is a command that shows the differences between two diff files,
that could help to merge changes from the patch to the working copy
of the same file.
- Re: On the adoption of transient.el, (continued)
- Re: On the adoption of transient.el, Dmitry Gutov, 2021/08/07
- Re: On the adoption of transient.el, Juri Linkov, 2021/08/10
- Re: On the adoption of transient.el, Dmitry Gutov, 2021/08/10
- Re: On the adoption of transient.el, Juri Linkov, 2021/08/11
- Re: On the adoption of transient.el, Dmitry Gutov, 2021/08/12
- Re: On the adoption of transient.el, Alfred M. Szmidt, 2021/08/07
- Re: On the adoption of transient.el, Juri Linkov, 2021/08/10
- Re: On the adoption of transient.el, Alfred M. Szmidt, 2021/08/10
- Re: On the adoption of transient.el,
Juri Linkov <=
- Re: On the adoption of transient.el, Arthur Miller, 2021/08/05
- Re: On the adoption of transient.el, Jean-Christophe Helary, 2021/08/05
- Re: On the adoption of transient.el, T.V Raman, 2021/08/05
- Re: On the adoption of transient.el, Eric S Fraga, 2021/08/05
- Re: On the adoption of transient.el, Arthur Miller, 2021/08/05
- Re: On the adoption of transient.el, Rudolf Adamkovič, 2021/08/06
- Re: On the adoption of transient.el, T.V Raman, 2021/08/06
- Re: On the adoption of transient.el, Phil Sainty, 2021/08/06
- Re: On the adoption of transient.el, Jonas Bernoulli, 2021/08/07
- Re: On the adoption of transient.el, T.V Raman, 2021/08/07