git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Gwyneth Morgan <gwymor@tilde.club>
To: Elijah Newren <newren@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [filter-repo PATCH] filter-repo: add new --replace-message option
Date: Mon, 23 Aug 2021 20:53:36 +0000	[thread overview]
Message-ID: <YSQK0JeaXtKWPgU2@tilde.club> (raw)
In-Reply-To: <CABPp-BF3EopyXGtKomnVjuavg2dX+79qLwkPjjyX+PO5JBSXtg@mail.gmail.com>

On 2021-08-23 10:34:07-0700, Elijah Newren wrote:
> Hi,
> 
> On Tue, Aug 17, 2021 at 9:38 PM Gwyneth Morgan <gwymor@tilde.club> wrote:
> >
> > Like --replace-text, add an option --replace-message which replaces text
> > in commit message bodies, so that users can easily replace text without
> > constructing a --message-callback.
> 
> Interesting idea.
> 
> Missing a Signed-off-by trailer.

Will fix.

> > @@ -894,7 +898,20 @@ YYYY-MM-DD.  In the expressions file, there are a few things to note:
> >      beginning and ends of lines rather than the beginning and end of file.
> >      See https://docs.python.org/3/library/re.html for details.
> >
> > -See also the `--blob-callback` from <<CALLBACKS>>.
> > +See also the `--blob-callback` from <<CALLBACKS>>.  Similarly, if you
> > +want to modify commit messages, you can do so with the same syntax.  For
> > +example, with a file named expressions.txt containing
> > +
> > +--------------------------------------------------
> > +foo==>bar
> > +--------------------------------------------------
> > +
> > +then running
> > +--------------------------------------------------
> > +git filter-repo --replace-message expressions.txt
> > +--------------------------------------------------
> > +
> > +will replace `foo` in commit messages with `bar`.
> 
> You've added this text to the "Content based filtering" section of the
> manual, which doesn't make sense.  It should go in a section about
> updating commit/tag messages.

Ah, got it. I'll move that into a new section.

> >      if self._message_callback:
> >        commit.message = self._message_callback(commit.message)
> > -
> 
> Why this stray line removal?

That was accidental. Will fix.

> >      # Change the author & committer according to mailmap rules
> >      args = self._args
> >      if args.mailmap:
> 
> As noted above, just as --message-callback affects both commit and tag
> messages, shouldn't this option affect both (i.e. should there also be
> a section in tweak_tag() similar to the one you added to
> tweak_commit())?

Yes, it should. I'll change that.

  reply	other threads:[~2021-08-23 20:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  4:37 [filter-repo PATCH] filter-repo: add new --replace-message option Gwyneth Morgan
2021-08-23 17:34 ` Elijah Newren
2021-08-23 20:53   ` Gwyneth Morgan [this message]
2021-08-23 20:55 ` [filter-repo PATCH v2] " Gwyneth Morgan
2021-08-25 15:08   ` Elijah Newren

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=YSQK0JeaXtKWPgU2@tilde.club \
    --to=gwymor@tilde.club \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    /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).