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

[PATCH] Documentation/git-filter-branch: add a new msg-filter example

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Feb 25, 2008, 14:43 UTC
Message-ID
<20080225144353.GT31441@genesis.frugalware.org>
In-Reply-To
<7v7iguxmlq.fsf@gitster.siamese.dyndns.org>

There were no example on how to edit commit messages, so add an msg-filter example.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
On Sun, Feb 24, 2008 at 09:58:41AM -0800, Junio C Hamano <gitster@pobox.com> wrote:
> Ahhhhhhh, that was the little voice that kept telling me there
> is something wrong with the patch...
uh-oh. third try :)
 Documentation/git-filter-branch.txt |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index e22dfa5..1948f6f 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -240,6 +240,15 @@ committed a merge between P1 and P2, it will be propagated properly
 and all children of the merge will become merge commits with P1,P2
 as their parents instead of the merge commit.
 
+You can rewrite the commit log messages using `--message-filter`.  For
+example, `git-svn-id` strings in a repository created by `git-svn` can
+be removed this way:
+
+-------------------------------------------------------
+git filter-branch --message-filter '
+	sed -e "/^git-svn-id:/d"
+'
+-------------------------------------------------------
 
 To restrict rewriting to only part of the history, specify a revision
 range in addition to the new branch name.  The new branch name will
-- 
1.5.4.3
Previous: Junio C Hamano
Message 6 of 6 in “Documentation/git-filter-branch: add a new commit-filter example”
  1. Documentation/git-filter-branch: add a new commit-filter exampleMiklos Vajna, Feb 23, 2008
  2. Junio C HamanoFeb 23, 2008
  3. Documentation/git-filter-branch: add a new commit-filter exampleMiklos Vajna, Feb 23, 2008
  4. Johannes SchindelinFeb 24, 2008
  5. Junio C HamanoFeb 24, 2008
  6. Documentation/git-filter-branch: add a new msg-filter exampleMiklos Vajna, Feb 25, 2008

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.