X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-filter-branch.sh;h=d846cd9c929e290e00da61167a9cb80ce30691eb;hb=a17171b473e0073f73b429abdf348de92394d6a6;hp=010353ad82881886b9739cc5f8de595acc9273ef;hpb=1b56bc9a1545902db64b8bdce48a499900acfe0b;p=git.git diff --git a/git-filter-branch.sh b/git-filter-branch.sh index 010353ad8..d846cd9c9 100755 --- a/git-filter-branch.sh +++ b/git-filter-branch.sh @@ -58,8 +58,8 @@ eval "$functions" # "author" or "committer set_ident () { - lid="$(echo "$1" | tr "A-Z" "a-z")" - uid="$(echo "$1" | tr "a-z" "A-Z")" + lid="$(echo "$1" | tr "[A-Z]" "[a-z]")" + uid="$(echo "$1" | tr "[a-z]" "[A-Z]")" pick_id_script=' /^'$lid' /{ s/'\''/'\''\\'\'\''/g @@ -234,7 +234,7 @@ case "$filter_subdir" in ;; *) git rev-list --reverse --topo-order --default HEAD \ - --parents --full-history "$@" -- "$filter_subdir" + --parents "$@" -- "$filter_subdir" esac > ../revs || die "Could not get the commits" commits=$(wc -l <../revs | tr -d " ") @@ -281,7 +281,7 @@ while read commit parents; do die "Could not checkout the index" # files that $commit removed are now still in the working tree; # remove them, else they would be added again - git ls-files -z --others | xargs -0 rm -f + git clean -d -q -f -x eval "$filter_tree" < /dev/null || die "tree filter failed: $filter_tree" @@ -309,7 +309,7 @@ while read commit parents; do sed -e '1,/^$/d' <../commit | \ eval "$filter_msg" > ../message || die "msg filter failed: $filter_msg" - sh -c "$filter_commit" "git commit-tree" \ + @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ $(git write-tree) $parentstr < ../message > ../map/$commit done <../revs