path: root/
diff options
authorSZEDER Gábor <>2015-11-23 12:23:16 (GMT)
committerJeff King <>2015-11-24 23:37:50 (GMT)
commit4d2a3646d1f0285ce072cdfe34a7df64710f9357 (patch)
treea8fca2cc3da5b8d85586898646a050d680ddcaa5 /
parent5cb2e162d21fa45a63f186b31970e2e9c9b10ba9 (diff)
filter-branch: deal with object name vs. pathname ambiguity in tree-filter
'git filter-branch' fails complaining about an ambiguous argument, if a tree-filter renames a path and the new pathname happens to match an existing object name. After the tree-filter has been applied, 'git filter-branch' looks for changed paths by running: git diff-index -r --name-only --ignore-submodules $commit which then, because of the lack of disambiguating double-dash, can't decide whether to treat '$commit' as revision or path and errors out. Add that disambiguating double-dash after 'git diff-index's revision argument to make sure that '$commit' is interpreted as a revision. Signed-off-by: SZEDER Gábor <> Signed-off-by: Jeff King <>
Diffstat (limited to '')
1 files changed, 1 insertions, 1 deletions
diff --git a/ b/
index fff8093..ad24c8d 100755
--- a/
+++ b/
@@ -319,7 +319,7 @@ while read commit parents; do
die "tree filter failed: $filter_tree"
- git diff-index -r --name-only --ignore-submodules $commit &&
+ git diff-index -r --name-only --ignore-submodules $commit -- &&
git ls-files --others
) > "$tempdir"/tree-state || exit
git update-index --add --replace --remove --stdin \