From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64055: Implementation of modifying VC change comments for Git Date: Mon, 21 Oct 2024 16:48:28 +0300 Message-ID: <86a5exh8ib.fsf@gnu.org> References: <874j59wym3.fsf@melete.silentflame.com> <868qukl73k.fsf@gnu.org> <87bjzfuzaq.fsf@melete.silentflame.com> <867ca3jhsd.fsf@gnu.org> <871q0brvyj.fsf@melete.silentflame.com> <8634krjfmo.fsf@gnu.org> <87bjzfqg7d.fsf@melete.silentflame.com> <878qujp0mq.fsf@melete.silentflame.com> <86y12jhva6.fsf@gnu.org> <87o73eor6j.fsf@melete.silentflame.com> <86r08aj2yz.fsf@gnu.org> <87wmi2kyt9.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38106"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Morgan.J.Smith@outlook.com, 64055@debbugs.gnu.org, dgutov@yandex.ru To: Sean Whitton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 21 15:50:14 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t2snV-0009ha-7N for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Oct 2024 15:50:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2smy-0000QL-Jj; Mon, 21 Oct 2024 09:49:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2smw-0000Pk-V1 for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 09:49:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t2smw-0003OV-MT for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 09:49:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=UvFlXTYU/iC9Opi2h+48NUdtfIfOsPx30Y/XgAlrCzE=; b=aaBf37BRuChF8G/7biUudlEnj12w9D23YZFXzUi0qZwUVX7A4shm3uWHsjzwBhUVD33+HCdhI7Wd+ZxYdQRIHEeaPNDy51XWpUzOpce/ysBW+vLuvkgEjDCsMNAUKvsDOj/+WKs8B56NuGGnIbIG4AtkWt1kKZz96OcUg+zuiJRJf88UOeJPtCE9000czCcjkHKIyFp2/d7uNexSrhG0UhUD7K331ZLZBXOGWwF8ibs7CzSKRG+KsdergkPlxEnldmrYNaUuPxaMO6a4fLG/o9KfeDYuNW9abgHOBp5NeT20idlVQk81btb+2Amb0OP7wQkCgPCXIPQS/OTeP06qUA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t2snM-0002Jy-Rk for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2024 09:50:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2024 13:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64055 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64055-submit@debbugs.gnu.org id=B64055.17295185518789 (code B ref 64055); Mon, 21 Oct 2024 13:50:04 +0000 Original-Received: (at 64055) by debbugs.gnu.org; 21 Oct 2024 13:49:11 +0000 Original-Received: from localhost ([127.0.0.1]:50694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2smU-0002Hg-El for submit@debbugs.gnu.org; Mon, 21 Oct 2024 09:49:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t2smO-0002H7-UB for 64055@debbugs.gnu.org; Mon, 21 Oct 2024 09:49:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t2sls-0003Lu-3w; Mon, 21 Oct 2024 09:48:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UvFlXTYU/iC9Opi2h+48NUdtfIfOsPx30Y/XgAlrCzE=; b=HPSyW0DhTSJZnSzX6XNU PkJ6blGjfYhM2bcDXrlM4WAwAYD2+MGCimn2j7NMLW5qEdz8L2wFmaCrPmKQggDytgGtq2He0KVtq 0gLoL7lz+qfA/smgNbHk852NbStx5TjE92XqeHU10XojE4k6TRwEQT+BSjrhtfce3FmVf/s0TtEc9 BMnO+debVkrKatQoUzbXynBhj6CHT8X8I1OTctPIyktrtlO4u6ZkuReUrLHbPSTH3jWL0JMDV209c k85SwTu0oopt5UwRgy2fxSu2I99DVx1rT0jw/2Io3TDaC+KD79BFckcxeLIrNO00alIXnXVr3vHDc 031yuhSTDEGGwQ==; In-Reply-To: <87wmi2kyt9.fsf@melete.silentflame.com> (message from Sean Whitton on Mon, 21 Oct 2024 09:52:02 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294058 Archived-At: > From: Sean Whitton > 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?