File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ while read commit parents; do
319
319
die " tree filter failed: $filter_tree "
320
320
321
321
(
322
- git diff-index -r --name-only --ignore-submodules $commit &&
322
+ git diff-index -r --name-only --ignore-submodules $commit -- &&
323
323
git ls-files --others
324
324
) > " $tempdir " /tree-state || exit
325
325
git update-index --add --replace --remove --stdin \
Original file line number Diff line number Diff line change @@ -418,4 +418,11 @@ test_expect_success 'filter commit message without trailing newline' '
418
418
test_cmp expect actual
419
419
'
420
420
421
+ test_expect_success ' tree-filter deals with object name vs pathname ambiguity' '
422
+ test_when_finished "git reset --hard original" &&
423
+ ambiguous=$(git rev-list -1 HEAD) &&
424
+ git filter-branch --tree-filter "mv file.t $ambiguous" HEAD^.. &&
425
+ git show HEAD:$ambiguous
426
+ '
427
+
421
428
test_done
You can’t perform that action at this time.
0 commit comments