Commit 242e520
committed
Help minimize export dumps differences when inspecting --dry-run results
When diffing the fast-export dumps produces by `--dry-run`, it appears
that git-filter-repo is using Python's default sorting algorithm for
Git filenames, rather than the fast-export-specific algorithm, which
is implemented at:
https://github.com/git/git/blob/14de3eb34435db79c6e7edc8082c302a26a8330a/builtin/fast-export.c#L444-L448
```
$ ./git-filter-repo --dry-run --proceed
$ 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
```
Note: this has no consequences on the resulting Git
repository. 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. This change
only avoids distracting differences when inspecting the modified
fast-export stream.
Signed-off-by: Sylvain Beucler <[email protected]>1 parent 2d39146 commit 242e520
1 file changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
3940 | 3941 | | |
3941 | 3942 | | |
3942 | 3943 | | |
3943 | | - | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
| 3957 | + | |
| 3958 | + | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
3944 | 3967 | | |
3945 | 3968 | | |
3946 | 3969 | | |
| |||
0 commit comments