test/send-email: --[no-]xmailer tests
[gitweb.git] / git-filter-branch.sh
index 98e8fe43d2fdde1b76e8f10f4c9473e23c8f347c..e6e99f5bb5102d394a25f156dbcba956f246054b 100755 (executable)
@@ -255,7 +255,7 @@ else
        remap_to_ancestor=t
 fi
 
-rev_args=$(git rev-parse --revs-only "$@")
+git rev-parse --revs-only "$@" >../parse
 
 case "$filter_subdir" in
 "")
@@ -268,7 +268,7 @@ case "$filter_subdir" in
 esac
 
 git rev-list --reverse --topo-order --default HEAD \
-       --parents --simplify-merges $rev_args "$@" > ../revs ||
+       --parents --simplify-merges --stdin "$@" <../parse >../revs ||
        die "Could not get the commits"
 commits=$(wc -l <../revs | tr -d " ")
 
@@ -332,7 +332,13 @@ while read commit parents; do
        parentstr=
        for parent in $parents; do
                for reparent in $(map "$parent"); do
-                       parentstr="$parentstr -p $reparent"
+                       case "$parentstr " in
+                       *" -p $reparent "*)
+                               ;;
+                       *)
+                               parentstr="$parentstr -p $reparent"
+                               ;;
+                       esac
                done
        done
        if [ "$filter_parent" ]; then