git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	git <git@vger.kernel.org>
Subject: Re: Non-interactively rewording commit messages
Date: Fri, 1 Jul 2022 13:10:15 +0200	[thread overview]
Message-ID: <CAP8UFD11yVhNK0zr1A9AkTyEOHfC9fBjgZTNHDWHA0=zmJWprQ@mail.gmail.com> (raw)
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:

> > 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.

  reply	other threads:[~2022-07-01 11:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 15:27 Non-interactively rewording commit messages Konstantin Ryabitsev
2022-06-30 17:32 ` Carlo Marcelo Arenas Belón
2022-06-30 17:34 ` Christian Couder
2022-06-30 17:54   ` Konstantin Ryabitsev
2022-06-30 18:10     ` Ævar Arnfjörð Bjarmason
2022-06-30 21:35   ` Junio C Hamano
2022-07-01 11:10     ` Christian Couder [this message]
2022-06-30 21:17 ` brian m. carlson
2022-07-01  4:01 ` Elijah Newren
2022-07-01 18:18   ` Konstantin Ryabitsev
2022-07-01 13:37 ` Johannes Schindelin

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: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CAP8UFD11yVhNK0zr1A9AkTyEOHfC9fBjgZTNHDWHA0=zmJWprQ@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=konstantin@linuxfoundation.org \
    /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://80x24.org/mirrors/git.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).