unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Sean Whitton <spwhitton@spwhitton.name>
Cc: Morgan.J.Smith@outlook.com, 64055@debbugs.gnu.org, dgutov@yandex.ru
Subject: bug#64055: Implementation of modifying VC change comments for Git
Date: Mon, 21 Oct 2024 16:48:28 +0300	[thread overview]
Message-ID: <86a5exh8ib.fsf@gnu.org> (raw)
In-Reply-To: <87wmi2kyt9.fsf@melete.silentflame.com> (message from Sean Whitton on Mon, 21 Oct 2024 09:52:02 +0800)

> From: Sean Whitton <spwhitton@spwhitton.name>
> Cc: 64055@debbugs.gnu.org,  dgutov@yandex.ru,  Morgan.J.Smith@outlook.com
> Date: Mon, 21 Oct 2024 09:52:02 +0800
> 
> I think the next thing to do is try the rebase from the command line.
> So, please use the debugging version of my patch to create the special
> "amend!" commit again, or use the one from yesterday if you still have
> it, or you could manually create it by passing --allow-empty to 'git
> commit'.
> 
> Then, at the command line, use
> 
>     git rebase --autosquash -i REV~1
> 
> where REV is the sha1 of the commit whose message you intend to edit.
> 
> This should open an editor with a rebase plan in which you see
> 
>     - the commit whose message you wanted to change
>     - followed by the special amend! commit
>     - followed by any other commits following the one whose message you wanted to change
> 
> i.e. the amend! commit has been pulled down in history to just after the
> commit whose message you want to cahnge.
> 
> Just save and exit without making any changes to the plan.
> 
> After that, the whole process should be complete: you should have the
> same commits as previously except the message should have been updated,
> and sha1 hashes will have changed.
> 
> Let me know if this all works.

I'm not sure I understood you correctly, but if I perform all these
step, I'm back at the original tip, with the original log message, not
the edited one.

But let me describe what I did and saw, to make sure I did it
correctly.

>     git rebase --autosquash -i REV~1
> 
> where REV is the sha1 of the commit whose message you intend to edit.

At this point "git log" shows a revision with my amended log message
(let's call this AMENDED-REV), followed by the revision with the
original log message (let's call it ORIG-REV).  So my Git command
looks like this:

  git rebase --autosquash -i ORIG-REV~1

After this step, I see this in the editor (where I indented the text
by 2 columns):

  pick bf73d7e Foobar with some Unicode אבגד ą ě č
  # pick bc3c567b2b136d040fd13373b6594c1ec026fec6 Foobar with some Unicode אבגד ą ě č

  # Rebase 6c6ea73..bc3c567 onto 6c6ea73 (1 command)
  #
  # Commands:
  # p, pick = use commit
  # r, reword = use commit, but edit the commit message
  # e, edit = use commit, but stop for amending
  # s, squash = use commit, but meld into previous commit
  # f, fixup = like "squash", but discard this commit's log message
  # x, exec = run command (the rest of the line) using shell
  # d, drop = remove commit
  #
  # These lines can be re-ordered; they are executed from top to bottom.
  #
  # If you remove a line here THAT COMMIT WILL BE LOST.
  #
  # However, if you remove everything, the rebase will be aborted.
  #
  # Note that empty commits are commented out

Here bf73d7e is ORIG-REV and bc3c567b is AMENDED-REV.  At this point,
I just type "C-x #", since you said "just save and exit" (of course,
saving is not needed, since I didn't edit the buffer).

After that, I see in the shell window:

  $ git rebase --autosquash -i bf73d7e036c5d80cdd112f34255a0ab1ea697c07~1
  Waiting for Emacs...
  Successfully rebased and updated refs/heads/master.

But "git log" shows the original log message for ORIG-REV.

Does this mean it didn't work? or did I misinterpret the steps?





  reply	other threads:[~2024-10-21 13:48 UTC|newest]

Thread overview: 70+ 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
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-21  0:01                       ` Dmitry Gutov
2024-10-21  1:45                         ` Sean Whitton
2024-10-21  5:27                         ` Eli Zaretskii
2024-10-21  1:52                       ` Sean Whitton
2024-10-21 13:48                         ` Eli Zaretskii [this message]
2024-10-22  8:25                           ` Sean Whitton
2024-10-22 13:27                             ` Eli Zaretskii
2024-10-22 13:42                               ` Sean Whitton
2024-10-22 14:20                                 ` Eli Zaretskii
2024-10-20 11:18               ` Eli Zaretskii
2024-10-20 23:55       ` Dmitry Gutov
2024-10-21  2:10         ` Sean Whitton
2024-10-21  0:09       ` Dmitry Gutov
2024-10-21  2:01         ` Sean Whitton
2024-10-21  5:39           ` Eli Zaretskii
2024-10-21  5:46             ` Sean Whitton
2024-10-21  5:49               ` Eli Zaretskii
2024-10-21 19:56               ` Dmitry Gutov
2024-10-22  8:29                 ` Sean Whitton
2024-10-21 20:08       ` Dmitry Gutov
2024-10-22  8:30         ` Sean Whitton

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=86a5exh8ib.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64055@debbugs.gnu.org \
    --cc=Morgan.J.Smith@outlook.com \
    --cc=dgutov@yandex.ru \
    --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).