git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Non-interactively rewording commit messages

From
Christian Couder <christian.couder@gmail.com>
Date
Jul 1, 2022, 11:10 UTC
Message-ID
<CAP8UFD11yVhNK0zr1A9AkTyEOHfC9fBjgZTNHDWHA0=zmJWprQ@mail.gmail.com>
In-Reply-To
<xmqqh741decp.fsf@gitster.g>
On Thu, Jun 30, 2022 at 11:35 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Christian Couder <christian.couder@gmail.com> writes:
Show 9 quoted lines
> > Have you tried `git interpret-trailers`?
>
> Do you mean a
>
>         git fast-export |
>         git interpret-trailers |
>         git fast-import
>
> pipeline?

I was thinking about using ways that are described a bit in the `git interpret-trailers` doc. And I was thinking about using ̀git rebase -i` and either adding "exec ..." lines to the todo list (possibly with `--exec ...` ) or maybe using "reword ..."

About ways that are described in the `git interpret-trailers` doc, there is:
* the following example with `git format-patch`:
      •   Extract the last commit as a patch, and add a Cc and a
Reviewed-by trailer to it:
              $ git format-patch -1
              0001-foo.patch
              $ git interpret-trailers --trailer 'Cc: Alice
<alice@example.com>' --trailer 'Reviewed-by: Bob <bob@example.com>'
0001-foo.patch >0001-bar.patch
* the example with a commit-msg hook that uses git interpret-trailers

BTW using interpret-trailers' --in-place option might be better than handling files the way it's done in both these examples.

Previous: Junio C HamanoNext: brian m. carlson
Message 7 of 11 in “Non-interactively rewording commit messages”
  1. Konstantin RyabitsevJun 30, 2022
  2. Carlo Marcelo Arenas BelónJun 30, 2022
  3. Christian CouderJun 30, 2022
  4. Konstantin RyabitsevJun 30, 2022
  5. Ævar Arnfjörð BjarmasonJun 30, 2022
  6. Junio C HamanoJun 30, 2022
  7. Christian CouderJul 1, 2022
  8. brian m. carlsonJun 30, 2022
  9. Elijah NewrenJul 1, 2022
  10. Konstantin RyabitsevJul 1, 2022
  11. Johannes SchindelinJul 1, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.