summaryrefslogtreecommitdiffstats
path: root/git-filter-branch.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2008-02-26 09:17:34 +0000
committerJunio C Hamano <junio@hera.kernel.org>2008-02-26 09:17:34 +0000
commit69f491759956153218a1ac862629c439a194d865 (patch)
tree5d2f59bda595624f8ebb6948123a0faf89420d40 /git-filter-branch.html
parent601f3e57cda1c2d25f08c890f345bc7239802d25 (diff)
downloadgit-htmldocs-69f491759956153218a1ac862629c439a194d865.tar.gz
Autogenerated HTML docs for v1.5.4.3-230-g2db511
Diffstat (limited to 'git-filter-branch.html')
-rw-r--r--git-filter-branch.html17
1 files changed, 14 insertions, 3 deletions
diff --git a/git-filter-branch.html b/git-filter-branch.html
index 036b3efe1..c8d3323d3 100644
--- a/git-filter-branch.html
+++ b/git-filter-branch.html
@@ -313,7 +313,9 @@ notable exception of the commit filter, for technical reasons).
Prior to that, the $GIT_COMMIT environment variable will be set to contain
the id of the commit being rewritten. Also, GIT_AUTHOR_NAME,
GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL,
-and GIT_COMMITTER_DATE are set according to the current commit.</p>
+and GIT_COMMITTER_DATE are set according to the current commit. If any
+evaluation of &lt;command&gt; returns a non-zero exit status, the whole operation
+will be aborted.</p>
<p>A <em>map</em> function is available that takes an "original sha1 id" argument
and outputs a "rewritten sha1 id" if the commit has been already
rewritten, and "original sha1 id" otherwise; the <em>map</em> function can
@@ -504,7 +506,7 @@ happened). If this is not the case, use:</p>
<div class="listingblock">
<div class="content">
<pre><tt>git filter-branch --parent-filter \
- 'cat; test $GIT_COMMIT = &lt;commit-id&gt; &amp;&amp; echo "-p &lt;graft-id&gt;"' HEAD</tt></pre>
+ 'test $GIT_COMMIT = &lt;commit-id&gt; &amp;&amp; echo "-p &lt;graft-id&gt;" || cat' HEAD</tt></pre>
</div></div>
<p>or even simpler:</p>
<div class="listingblock">
@@ -542,6 +544,15 @@ parameters. Note that this handles merges properly! In case Darl
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.</p>
+<p>You can rewrite the commit log messages using <tt>--message-filter</tt>. For
+example, <tt>git-svn-id</tt> strings in a repository created by <tt>git-svn</tt> can
+be removed this way:</p>
+<div class="listingblock">
+<div class="content">
+<pre><tt>git filter-branch --message-filter '
+ sed -e "/^git-svn-id:/d"
+'</tt></pre>
+</div></div>
<p>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
point to the top-most revision that a <em>git rev-list</em> of this range
@@ -593,7 +604,7 @@ and the git list &lt;git@vger.kernel.org&gt;</p>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 01-Feb-2008 10:52:24 UTC
+Last updated 26-Feb-2008 09:16:45 UTC
</div>
</div>
</body>