unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dmitry@gutov.dev>
To: Sean Whitton <spwhitton@spwhitton.name>
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>,
	Robert Pluim <rpluim@gmail.com>,
	64055@debbugs.gnu.org
Subject: bug#64055: [WIP Patch] Enable editing commit messages - vc-git-modify-change-comment
Date: Sun, 20 Oct 2024 01:16:25 +0100	[thread overview]
Message-ID: <a2559bae-4b88-4006-908f-d3750755159f@gutov.dev> (raw)
In-Reply-To: <87jze6vwtx.fsf@melete.silentflame.com>

On 18/10/2024 07:50, Sean Whitton wrote:
>> So if we determined that its output could be used for editing, perhaps after
>> some massaging (e.g. reindenting and keeping only a subset of the headers),
>> that could be a minor win -- fewer methods is better in general. I haven't
>> tried to code it, so there could be pitfalls.
> I thought about it and realised that, for the git case, variables like
> vc-git-log-switches and vc-git-shortlog-switches can affect the output,
> and could make us misparse it.  And ultimately the benefits of avoiding
> a new backend method didn't seem to outweigh having parsing code that
> could turn out to be fragile.

IIUC vc-git-expanded-log-entry is only affected by the former var. We 
could bind it to nil (that could even be done generically, by looking 
for all vars called vc-BACKEND-log-switches).

But I agree fragility could be a problem. It could also be a win to have 
one of the methods to be implemented in terms of the other.

>> The new vc-git-get-change-comment seems good in terms of functionality. I was
>> thinking that the headers such as Author, No-Verify and Sign-Off, might be
>> good to show as well, but as long as their values are intact after the edit,
>> that's optional.
> I thought that it would be nice to include Author, in particular, as you
> might need to amend the value.  That would require adding additional
> arguments to the modify-change-comment action, though, so I left it for
> later if someone wants to implement it.

I think you're parsing out all the headers from the COMMENT argument in 
the posted patch, so this paragraph seems to be moot. Like you say in 
the patch though, it seems changing Author is not supported.

To do that, apparently we'd either need to rebase with a pause (with 
'git amend' in the middle), or use 'git rebase --exec' like in 
https://stackoverflow.com/a/79068024/615245. The latter seems like it 
would apply to all commits in the range, so it might require the same 
dance as 'amend'.

(I can comment on the patch itself tomorrow.)





  reply	other threads:[~2024-10-20  0:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 22:59 bug#64055: [WIP Patch] Enable editing commit messages - vc-git-modify-change-comment Morgan Smith
2023-06-14  8:00 ` Robert Pluim
2023-06-14 11:41   ` Morgan Smith
2023-06-14 13:13     ` Robert Pluim
2023-06-14 13:54       ` Morgan Smith
2023-06-14 15:30         ` Robert Pluim
2024-10-01  2:38       ` Sean Whitton
2024-10-01 19:32         ` Dmitry Gutov
2024-10-02  0:01           ` Sean Whitton
2024-10-02 23:20             ` Dmitry Gutov
2024-10-10  2:39               ` Sean Whitton
2024-10-10  2:48                 ` Sean Whitton
2024-10-17 13:27                   ` Sean Whitton
2024-10-18  5:26                     ` Eli Zaretskii
2024-10-18  6:20                       ` Sean Whitton
2024-10-18  9:14                         ` Eli Zaretskii
2024-10-18  9:30                           ` Sean Whitton
2024-10-18 12:18                             ` Eli Zaretskii
2024-10-20  0:56                               ` Sean Whitton
2024-10-20  4:58                                 ` Eli Zaretskii
2024-10-20  5:29                                   ` Sean Whitton
2024-10-20  6:09                                     ` Eli Zaretskii
2024-10-20  7:18                                       ` Sean Whitton
2024-10-20  8:20                                         ` Eli Zaretskii
2024-10-20  8:42                                           ` Sean Whitton
2024-10-20  8:56                                             ` Eli Zaretskii
2024-10-18  0:46                 ` Dmitry Gutov
2024-10-18  4:50                   ` Sean Whitton
2024-10-20  0:16                     ` Dmitry Gutov [this message]
2024-10-20  0:58                       ` Sean Whitton
2023-06-17  2:40 ` Dmitry Gutov
2024-10-01  2:37   ` Sean Whitton
2024-10-01 13:35     ` Dmitry Gutov
2024-10-10  2:45 ` Sean Whitton
2024-10-10  6:12   ` Eli Zaretskii
2024-10-10  6:23     ` Sean Whitton
2024-10-10  7:36       ` Eli Zaretskii
2024-10-10  7:46         ` Sean Whitton
2024-10-18  9:26 ` bug#64055: Implementation of modifying VC change comments for Git Sean Whitton
2024-10-19 10:28   ` Eli Zaretskii
2024-10-20  5:19     ` Sean Whitton
2024-10-20  8:32       ` Eli Zaretskii
2024-10-20  8:59         ` Sean Whitton
2024-10-20  9:19           ` Eli Zaretskii
2024-10-20  9:25             ` Sean Whitton
2024-10-20  9:46               ` Sean Whitton
2024-10-20 11:24                 ` Eli Zaretskii
2024-10-20 13:11                   ` Sean Whitton
2024-10-20 13:52                     ` Eli Zaretskii
2024-10-20 11:18               ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2559bae-4b88-4006-908f-d3750755159f@gutov.dev \
    --to=dmitry@gutov.dev \
    --cc=64055@debbugs.gnu.org \
    --cc=Morgan.J.Smith@outlook.com \
    --cc=rpluim@gmail.com \
    --cc=spwhitton@spwhitton.name \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).