Skip to content

Commit f52752d

Browse files
committed
Merge branch 'lc/filter-branch-too-many-refs'
"git filter-branch" in a repository with many refs blew limit of command line length. * lc/filter-branch-too-many-refs: Allow git-filter-branch to process large repositories with lots of branches.
2 parents ff6e1b8 + 3361a54 commit f52752d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-filter-branch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ else
255255
remap_to_ancestor=t
256256
fi
257257

258-
rev_args=$(git rev-parse --revs-only "$@")
258+
git rev-parse --revs-only "$@" >../parse
259259

260260
case "$filter_subdir" in
261261
"")
@@ -268,7 +268,7 @@ case "$filter_subdir" in
268268
esac
269269

270270
git rev-list --reverse --topo-order --default HEAD \
271-
--parents --simplify-merges $rev_args "$@" > ../revs ||
271+
--parents --simplify-merges --stdin "$@" <../parse >../revs ||
272272
die "Could not get the commits"
273273
commits=$(wc -l <../revs | tr -d " ")
274274

0 commit comments

Comments
 (0)