]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-filter-branch.sh
rebase -i: mention the option to split commits in the man page
[thirdparty/git.git] / git-filter-branch.sh
index b5fa44920d40d3144567509a6922a07bb87977ae..c166c978ec2a6e1dc26d8fb117c12ae59ca5b7fd 100755 (executable)
@@ -8,7 +8,13 @@
 # a new branch. You can specify a number of filters to modify the commits,
 # files and trees.
 
-USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] DESTBRANCH [REV-RANGE]"
+USAGE="[--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>] \
+[--original <namespace>] [-d <directory>] [-f | --force] \
+[<rev-list options>...]"
+
 . git-sh-setup
 
 warn () {
@@ -134,7 +140,7 @@ do
                filter_subdir="$OPTARG"
                ;;
        --original)
-               orig_namespace="$OPTARG"
+               orig_namespace=$(expr "$OPTARG/" : '\(.*[^/]\)/*$')/
                ;;
        *)
                usage
@@ -170,13 +176,6 @@ do
        esac
 done < "$tempdir"/backup-refs
 
-case "$GIT_DIR" in
-/*)
-       ;;
-*)
-       GIT_DIR="$(pwd)/../../$GIT_DIR"
-       ;;
-esac
 export GIT_DIR GIT_WORK_TREE=.
 
 # These refs should be updated if their heads were rewritten