filter-repo: avoid clobbering files whose names differ in case only
git fast-import, in an attempt to be friendly, allows the same file to be specified multiple times within a commit and just takes the last version of the file listed. It determines whether files are the same via fspathncmp, which is defined differently depending on the setting of core.ignorecase. Unfortunately, this means that if someone is trying to do filtering of history and using a broken (case-insensitive) filesystem and the history they are filtering has some paths that differed in name only, then fast-import will delete whichever of the "colliding" files is listed first. Avoid these problems by just turning off core.ignorecase while fast-import is running. This will prevent silently modifying the repo in an unexpected way. Users on such filesystems may have difficulty checking out commits with files which differ in case only, but that is a separate problem for them to deal with after rewriting history. Signed-off-by: Elijah Newren <newren@gmail.com>pull/43/head
parent
b1a35a3057
commit
f9ebe6a3f7
Loading…
Reference in New Issue