From: Dmitry Gutov <dgutov@yandex.ru>
To: Juri Linkov <juri@linkov.net>
Cc: 52349@debbugs.gnu.org
Subject: bug#52349: 29.0.50; vc-git and diff-mode: stage hunks
Date: Mon, 29 Aug 2022 02:34:46 +0300 [thread overview]
Message-ID: <310d5a9d-fbe4-4fd1-dcd0-34cf08388771@yandex.ru> (raw)
In-Reply-To: <8635dgkv80.fsf@mail.linkov.net>
On 28.08.2022 22:45, Juri Linkov wrote:
> close 52349 29.0.50
> thanks
>
>>> The problem is that currently using 'C-c C-d' (log-edit-show-diff)
>>> in the *vc-log* buffer doesn't show the same diff that will be really
>>> committed when different files were marked in *vc-dir* parent buffer
>>> before typing 'C-c C-c' in *vc-log*.
>>> This is because currently log-edit-diff-function is set to vc-diff
>>> that is not suitable here since it tries to deduce fileset again
>>> from *vc-dir*, but files to commit are set in the buffer-local
>>> 'vc-log-fileset' in *vc-log*. So I added a new function
>>> 'log-edit-diff-fileset' that shows the diff from 'vc-log-fileset'.
>>> Using the same naming scheme, I renamed 'vc-diff-patch' to
>>> 'log-edit-diff-patch'.
>>> This shows the difference from the previous patch,
>>> but later these changes could be committed separately:
>>
>> Makes perfect sense, thanks.
>
> So now pushed and closed. If more changes are needed,
> this could be reopened or a new bug report opened.
Seems to be working well. Thank you!
>> Honestly, I think it's a long-requested advanced feature which we'd be
>> happy to have even if there were rough edges remaining (as long as it
>> doesn't corrupt users' files or otherwise loses changes, of course). But
>> this seems to be coming along nicely.
>
> 'vc-finish-logentry' has such FIXME:
>
> (let ((logbuf (current-buffer))
> (log-operation vc-log-operation)
> ;; FIXME: When coming from VC-Dir, we should check that the
> ;; set of selected files is still equal to vc-log-fileset,
> ;; to avoid surprises.
> (log-fileset vc-log-fileset)
> (pop-to-buffer vc-parent-buffer)
>
> I tried to fix this, but it requires duplicating too much code
> from vc-next-action, including code that prepares 'ready-for-commit'
> list of files. I'm afraid that such check often will raise
> a false alarm.
>
> OTOH, maybe this check is not needed since I fixed 'C-c C-d' above
> to show the same diff that will be committed using vc-log-fileset,
> and 'C-c C-c' uses the same vc-log-fileset as well.
Hopefully, yes.
next prev parent reply other threads:[~2022-08-28 23:34 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 8:59 bug#52349: 29.0.50; vc-git and diff-mode: stage hunks Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-07 17:03 ` Juri Linkov
2021-12-07 17:08 ` Manuel Uberti via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-07 19:04 ` Juri Linkov
2021-12-07 17:10 ` Dmitry Gutov
2021-12-07 19:06 ` Juri Linkov
2021-12-08 2:29 ` Dmitry Gutov
2021-12-08 18:57 ` Juri Linkov
2021-12-09 23:17 ` Dmitry Gutov
2022-02-08 19:57 ` Juri Linkov
2022-02-12 1:43 ` Dmitry Gutov
2022-02-12 19:42 ` Juri Linkov
2022-02-13 1:32 ` Dmitry Gutov
2022-02-13 19:48 ` Juri Linkov
2022-02-13 22:51 ` Dmitry Gutov
2022-02-13 19:56 ` Juri Linkov
2022-02-13 22:41 ` Dmitry Gutov
2022-08-21 16:07 ` Juri Linkov
2022-02-13 22:37 ` Dmitry Gutov
2022-08-21 18:53 ` Juri Linkov
2022-08-24 2:06 ` Dmitry Gutov
2022-08-24 18:20 ` Juri Linkov
2022-08-24 20:20 ` Dmitry Gutov
2022-08-27 20:07 ` Juri Linkov
2022-08-28 0:40 ` Dmitry Gutov
2022-08-28 19:45 ` Juri Linkov
2022-08-28 23:34 ` Dmitry Gutov [this message]
2022-09-08 19:29 ` Juri Linkov
2022-09-08 22:48 ` Sean Whitton
2022-09-10 1:36 ` Dmitry Gutov
2022-09-11 15:05 ` Juri Linkov
2022-09-11 21:57 ` Dmitry Gutov
2022-09-12 18:19 ` Juri Linkov
2022-09-19 2:09 ` Dmitry Gutov
2022-09-19 6:50 ` Juri Linkov
2022-09-19 12:57 ` Dmitry Gutov
2022-10-02 18:51 ` Juri Linkov
2022-11-04 1:32 ` Dmitry Gutov
2022-08-26 17:11 ` Filipp Gunbin
2022-08-27 19:56 ` Juri Linkov
2021-12-07 20:07 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=310d5a9d-fbe4-4fd1-dcd0-34cf08388771@yandex.ru \
--to=dgutov@yandex.ru \
--cc=52349@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.