You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Help minimize export dumps differences when inspecting --dry-run results
Diffing the fast-export dumps with `--dry-run`, it appears git-filter-repo is using Python's default sorting algorithm for Git trees, rather than the Git-specific algorithm, which is described a bit at:
https://stackoverflow.com/questions/78981525/how-git-sort-entries-in-trees
```
$ diff -u .git/filter-repo/fast-export.original .git/filter-repo/fast-export.filtered
...
@@ -1451,25 +1329,23 @@
D testcases/expected/case1-twenty
D testcases/inputs/case1
M 100755 0a13abf testcases/t9390-repo-filter.sh
+M 100644 de3799f testcases/t9390/case1
M 100644 e0c8845 testcases/t9390/case1-filename
M 100644 a1aa78f testcases/t9390/case1-ten
M 100644 488cbd9 testcases/t9390/case1-twenty
-M 100644 de3799f testcases/t9390/case1
```
Unlike described above though, it appears the fast-export dumps treats all files as directory when sorting them (`case1` is a file in the example above), so appending "/" to all entries maintains the original tree order.
Note: git-filter-repo doesn't write tree objects directly; it has git-fast-import do that. git-fast-import states that the order of the filemodify directives given to it does not matter. So this doesn't change the resulting Git repository.
0 commit comments