I have a merge commit that includes 2 modified (!) files: hello/foo/stubs/example.php hello/world.php I want to only get the changes introduced by the merge commit and exclude any changes in /foo/stubs/: git diff -l0 --name-status --find-renames "$sha"^'!' -- ':!*/foo/stubs/*' Git takes more than 4 minutes to generate this diff, since hello/foo/stubs/example.php is a huge file. When using --no-renames (instead of --find-renames) it's much, much faster. And without the example.php file, the diff takes less than 1 second instead of 4+ minutes. Funnily enough, when I have a merge commit that contains only that 1 excluded file, it's the same behavior. 1) if there's only a single file in a commit, why does --find-renames cause a slowdown? There's nothing that could have been renamed in that case (probably the same for --find-copies) 2) could rename detection be "delayed" to only run/check if there are actually additions/deletions (and possibly only check those)? If a commit only contains modifications (unlike in a really, really 0.0001% edge case) but no additions+deletions it's extremely unlikely that there's a rename, so detection could be skipped altogether?