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.
This commit is contained in:
Junio C Hamano 2013-10-17 15:55:12 -07:00
commit f52752d36a

View File

@ -255,7 +255,7 @@ else
remap_to_ancestor=t remap_to_ancestor=t
fi fi
rev_args=$(git rev-parse --revs-only "$@") git rev-parse --revs-only "$@" >../parse
case "$filter_subdir" in case "$filter_subdir" in
"") "")
@ -268,7 +268,7 @@ case "$filter_subdir" in
esac esac
git rev-list --reverse --topo-order --default HEAD \ 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" die "Could not get the commits"
commits=$(wc -l <../revs | tr -d " ") commits=$(wc -l <../revs | tr -d " ")