Re: [PATCHv2] Make filter-branch work with many branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 20.07.2011 15:42, schrieb Dave Zarzycki:
> -rev_args=$(git rev-parse --revs-only "$@")
> +rev_parse_args="$@"

This won't do what you expect when "$@" should expand to more than one
word.

I meant something like the following. Warning: Completely untested.

diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 962a93b..d0a933e 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -274,7 +274,7 @@ else
 	remap_to_ancestor=t
 fi
 
-rev_args=$(git rev-parse --revs-only "$@")
+git rev-parse --revs-only "$@" >../revargs || exit
 
 case "$filter_subdir" in
 "")
@@ -287,7 +287,7 @@ case "$filter_subdir" in
 esac
 
 git rev-list --reverse --topo-order --default HEAD \
-	--parents --simplify-merges $rev_args "$@" > ../revs ||
+	--parents --simplify-merges --stdin "$@" <../revargs >../revs ||
 	die "Could not get the commits"
 commits=$(wc -l <../revs | tr -d " ")
 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]