]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-filter-branch.sh
Free the path_lists used to find non-local tags in git-fetch
[git.git] / git-filter-branch.sh
index ed54e20b2f048051c57e3af87cfd3cdc6612526f..49e13f0bb1ed2bcb6e85455f24dffa912927d67a 100755 (executable)
@@ -92,7 +92,7 @@ USAGE="[--env-filter <command>] [--tree-filter <command>] \
 [--msg-filter <command>] [--commit-filter <command>] \
 [--tag-name-filter <command>] [--subdirectory-filter <directory>] \
 [--original <namespace>] [-d <directory>] [-f | --force] \
-<rev-list options>"
+[<rev-list options>...]"
 
 OPTIONS_SPEC=
 . git-sh-setup
@@ -276,10 +276,11 @@ while read commit parents; do
                eval "$filter_tree" < /dev/null ||
                        die "tree filter failed: $filter_tree"
 
-               git diff-index -r $commit | cut -f 2- | tr '\012' '\000' | \
-                       xargs -0 git update-index --add --replace --remove
-               git ls-files -z --others | \
-                       xargs -0 git update-index --add --replace --remove
+               (
+                       git diff-index -r --name-only $commit
+                       git ls-files --others
+               ) |
+               git update-index --add --replace --remove --stdin
        fi
 
        eval "$filter_index" < /dev/null ||