filter-branch: return 2 when nothing to rewrite
[gitweb.git] / Documentation / git-filter-branch.txt
index bebdcdec5ad4775588abe8814c59a269c7c1a832..b634043183b453a89b3f56e0544503b06ccdbdec 100644 (file)
@@ -8,11 +8,11 @@ git-filter-branch - Rewrite branches
 SYNOPSIS
 --------
 [verse]
-'git filter-branch' [--setup <command>] [--env-filter <command>]
-       [--tree-filter <command>] [--index-filter <command>]
-       [--parent-filter <command>] [--msg-filter <command>]
-       [--commit-filter <command>] [--tag-name-filter <command>]
-       [--subdirectory-filter <directory>] [--prune-empty]
+'git filter-branch' [--setup <command>] [--subdirectory-filter <directory>]
+       [--env-filter <command>] [--tree-filter <command>]
+       [--index-filter <command>] [--parent-filter <command>]
+       [--msg-filter <command>] [--commit-filter <command>]
+       [--tag-name-filter <command>] [--prune-empty]
        [--original <namespace>] [-d <directory>] [-f | --force]
        [--state-branch <branch>] [--] [<rev-list options>...]
 
@@ -89,6 +89,11 @@ OPTIONS
        can be used or modified in the following filter steps except
        the commit filter, for technical reasons.
 
+--subdirectory-filter <directory>::
+       Only look at the history which touches the given subdirectory.
+       The result will contain that directory (and only that) as its
+       project root. Implies <<Remap_to_ancestor>>.
+
 --env-filter <command>::
        This filter may be used if you only need to modify the environment
        in which the commit will be performed.  Specifically, you might
@@ -167,11 +172,6 @@ be removed, buyer beware. There is also no support for changing the
 author or timestamp (or the tag message for that matter). Tags which point
 to other tags will be rewritten to point to the underlying commit.
 
---subdirectory-filter <directory>::
-       Only look at the history which touches the given subdirectory.
-       The result will contain that directory (and only that) as its
-       project root. Implies <<Remap_to_ancestor>>.
-
 --prune-empty::
        Some filters will generate empty commits that leave the tree untouched.
        This option instructs git-filter-branch to remove such commits if they
@@ -222,6 +222,14 @@ this purpose, they are instead rewritten to point at the nearest ancestor that
 was not excluded.
 
 
+EXIT STATUS
+-----------
+
+On success, the exit status is `0`.  If the filter can't find any commits to
+rewrite, the exit status is `2`.  On any other error, the exit status may be
+any other non-zero value.
+
+
 Examples
 --------