Code

gitweb: Lift any characters restriction on searched strings
[git.git] / git-filter-branch.sh
index 0ff3475525a0d50739f218abbac91eb2dc926430..01900602e1f64483d2999f48aecea530f7afbc0b 100755 (executable)
@@ -8,7 +8,7 @@
 # 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="git-filter-branch [-d TEMPDIR] [FILTERS] [REV-RANGE]"
 . git-sh-setup
 
 warn () {
@@ -170,13 +170,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
@@ -298,7 +291,7 @@ do
        # Assign the boundarie(s) in the set of rewritten commits
        # as the replacement commit(s).
        # (This would look a bit nicer if --not --stdin worked.)
-       for p in $((cd "$workdir"/../map; ls | sed "s/^/^/") |
+       for p in $( (cd "$workdir"/../map; ls | sed "s/^/^/") |
                git rev-list $ref --boundary --stdin |
                sed -n "s/^-//p")
        do