* [PATCH] Make filter-branch work with many branches
@ 2011-07-19 16:29 Dave Zarzycki
2011-07-19 18:06 ` Johannes Sixt
0 siblings, 1 reply; 3+ messages in thread
From: Dave Zarzycki @ 2011-07-19 16:29 UTC (permalink / raw)
To: git
When there are many branches, we can overflow the maximum number of
arguments to exec*().
Signed-off-by: Dave Zarzycki <zarzycki@apple.com>
---
git-filter-branch.sh | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 962a93b..0c03db0 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -274,8 +274,6 @@ else
remap_to_ancestor=t
fi
-rev_args=$(git rev-parse --revs-only "$@")
-
case "$filter_subdir" in
"")
eval set -- "$(git rev-parse --sq --no-revs "$@")"
@@ -286,8 +284,8 @@ case "$filter_subdir" in
;;
esac
-git rev-list --reverse --topo-order --default HEAD \
- --parents --simplify-merges $rev_args "$@" > ../revs ||
+git rev-parse --revs-only "$@" | git rev-list --stdin --reverse --topo-order \
+ --default HEAD --parents --simplify-merges "$@" > ../revs ||
die "Could not get the commits"
commits=$(wc -l <../revs | tr -d " ")
--
1.7.6.135.g8cdba
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Make filter-branch work with many branches
2011-07-19 16:29 [PATCH] Make filter-branch work with many branches Dave Zarzycki
@ 2011-07-19 18:06 ` Johannes Sixt
2011-07-20 13:34 ` Dave Zarzycki
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2011-07-19 18:06 UTC (permalink / raw)
To: Dave Zarzycki; +Cc: git
Am 19.07.2011 18:29, schrieb Dave Zarzycki:
> -rev_args=$(git rev-parse --revs-only "$@")
> -
> case "$filter_subdir" in
> "")
> eval set -- "$(git rev-parse --sq --no-revs "$@")"
This line in the hunk context changes what "$@" will produce. Therefore,
the "$@" that you removed above will not produce the same thing...
> @@ -286,8 +284,8 @@ case "$filter_subdir" in
> ;;
> esac
>
> -git rev-list --reverse --topo-order --default HEAD \
> - --parents --simplify-merges $rev_args "$@" > ../revs ||
> +git rev-parse --revs-only "$@" | git rev-list --stdin --reverse --topo-order \
> + --default HEAD --parents --simplify-merges "$@" > ../revs ||
... that you insert here. How can the result ever have worked for you?
Perhaps store the list of revs in a temporary file?
-- Hannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Make filter-branch work with many branches
2011-07-19 18:06 ` Johannes Sixt
@ 2011-07-20 13:34 ` Dave Zarzycki
0 siblings, 0 replies; 3+ messages in thread
From: Dave Zarzycki @ 2011-07-20 13:34 UTC (permalink / raw)
To: Johannes Sixt; +Cc: git
On Jul 19, 2011, at 11:06 AM, Johannes Sixt wrote:
> Am 19.07.2011 18:29, schrieb Dave Zarzycki:
>> -rev_args=$(git rev-parse --revs-only "$@")
>> -
>> case "$filter_subdir" in
>> "")
>> eval set -- "$(git rev-parse --sq --no-revs "$@")"
>
> This line in the hunk context changes what "$@" will produce. Therefore,
> the "$@" that you removed above will not produce the same thing...
Thanks. My shell scripting is rather rusty these days. I'll send a new patch.
davez
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-20 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 16:29 [PATCH] Make filter-branch work with many branches Dave Zarzycki
2011-07-19 18:06 ` Johannes Sixt
2011-07-20 13:34 ` Dave Zarzycki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).