From: Junio C Hamano <gitster@pobox.com>
To: Miklos Vajna <vmiklos@frugalware.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Documentation/git-filter-branch: add a new commit-filter example
Date: Sat, 23 Feb 2008 11:45:28 -0800 [thread overview]
Message-ID: <7vejb3319j.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080223193058.GE31441@genesis.frugalware.org> (Miklos Vajna's message of "Sat, 23 Feb 2008 20:30:58 +0100")
Miklos Vajna <vmiklos@frugalware.org> writes:
> There is a commit-filter example already which skips commits but there is no
> example on how to edit commit messages.
>
> One can figure out this example by carefully reading the git-filter-branch and
> git-commit-tree documentation but I think it isn't trivial so this example is
> helpful.
>
> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
> ---
>
> The lack of such an example was noticed by dvorak on IRC.
>
> Documentation/git-filter-branch.txt | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
> index e22dfa5..a035b9c 100644
> --- a/Documentation/git-filter-branch.txt
> +++ b/Documentation/git-filter-branch.txt
> @@ -240,6 +240,12 @@ 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.
>
> +To remove the 'git-svn-id' strings from commit messages in a repository created
> +by git-svn:
People who are not interested in git-svn at all may still want
to fix up their commit log messages, and I think starting a
paragraph with 'git-svn-blah' would risk them skipping it
without reading (I certainly would). Probably we would want to
add a sentence before "To remove ...", like this:
You can rewrite the commit log messages using `--commit-filter`.
For example, `git-svn-id` strings in a repository created with
`git-svn` can be cleaned up this way:
> +------------------------------------------------------------------------------
> +git filter-branch --commit-filter 'sed "/^git-svn-id:/d" |git commit-tree "$@"'
> +------------------------------------------------------------------------------
Please try to keep them a bit shorter for reviewing pleasure on
80-column terminals after your message was quoted once or
perhaps a few times. The example is easier to read if you write
like this, I think:
----------------------------------------------------------------
git filter-branch --commit-filter '
sed -e "/^git-svn-id:/d" | git commit-tree "$@"
'
----------------------------------------------------------------
I am not sure if git-svn people condone or encourage such
removals, though.
next prev parent reply other threads:[~2008-02-23 19:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 19:30 [PATCH] Documentation/git-filter-branch: add a new commit-filter example Miklos Vajna
2008-02-23 19:45 ` Junio C Hamano [this message]
2008-02-23 22:04 ` Miklos Vajna
2008-02-24 10:53 ` Johannes Schindelin
2008-02-24 17:58 ` Junio C Hamano
2008-02-25 14:43 ` [PATCH] Documentation/git-filter-branch: add a new msg-filter example Miklos Vajna
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vejb3319j.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=vmiklos@frugalware.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.
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 NNTP newsgroup(s).