Subject: Re: Implementation of modifying VC change comments for Git

From: Sean Whitton <[email-masked]>
Date: Tue, 22 Oct 2024 21:42:33 +0800

Hello,

On Tue 22 Oct 2024 at 04:27pm +03, Eli Zaretskii wrote:

> It isn't there because you didn't tell me to include it.  The original
> commit was lost when I tried to perform the steps the previous time,
> so I had to reproduce it, and I used the last part of this step to
> produce it:
>
>> 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'.
>
> IOW, I "manually created it by passing --allow-empty to 'git commit'",
> but since you didn't say what log message to give, I used just some
> random text, and it didn't include "amend!".  If the log message I use
> in this step must have some specific structure or content, please give
> more detailed instructions.
> [...]
> The diff no longer applies to the current master.  And I prefer doing
> that manually anyway.  So let's have those instructions in full
> detail.

Okay, this should do it:

- Manually create a temporary file somewhere outside the repository;
  I'll refer to its absolute file name as TEMP.

- Put the commit message for ORIG-REV into the temporary file.

- Modify that commit message to include the Unicode, or whatever.

- Prepend "amend! <sha1 of ORIG-REV>\n\n".  So for example:

--8<---------------cut here---------------start------------->8---
amend! 212cf3125611b123707feac6f7ffd55a230bc568

Make all the entries in 'eshell-parse-argument-hook' named functions

* lisp/eshell/esh-arg.el (eshell-parse-number, eshell-parse-non-special)
(eshell-parse-whitespace, eshell-parse-comment): New functions...
(eshell-parse-argument-hook): ... use them.   אבגד ą ě č
--8<---------------cut here---------------end--------------->8---

- Save the temporary file.

- Ensure there are no staged changes.
  ('git reset' with no arguments should do it)

- git commit --allow-empty -F TEMP

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

-- 
Sean Whitton