git import: build merges from the paths they can change, by default d256e826ac5d
Measured on VS Code from the 139k import: the same 400 commits imported both ways gave identical git verify reports over all 450 commits checked, with merges 3.2 times faster (9.5 s against 30.9 s on average) and the import 2.7 times faster. Partial merges are now the default; OXY_IMPORT_WHOLE_MERGES=1 takes the whole-tree path. closes #80
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-10-09 05:20 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
d256e826ac5d531239d11bff64c5c17833f3250ae78a16c00d0e4f0320c9478d- Depends on
- 579afd107b9b 79ab8528ff62 810691ca6ce6 8fd78eb52ad2 ce118287d9da
- Depended on by
- d0bf2da15094 f6dccc4533c8
- In bookmarks
- bare-hashes carried-not-removed carry-identical doctor-trust identical-sides keyless-tags main merge-remote-bookmark only-help-103 paths-for-resolutions-and-amend push-notes show-stat subrepo-pin-state switch-says
- In tags
- v0.10.0 v0.11.0 v0.4.2 v0.4.3 v0.4.4 v0.4.5 v0.4.6 v0.5.0 v0.5.1 v0.6.0 v0.7.0 v0.8.0 v0.9.0
- Edits
- 4 atoms, 0 tree operations, 2 files
Browse the tree at this change
modified CHANGELOG.md +10 −0
| 1 | 1 | # Changelog |
|
| 2 | 2 | ||
| 3 | + | ## Unreleased |
|
| 4 | + | ||
| 5 | + | - **Faster merges in a Git import (#80).** A merge is built from only the paths it can change, as an ordinary commit is: on VS Code at 139 000 commits merges import 3.2 times faster (9.5 s against 30.9 s on average) and the import as a whole 2.7 times faster, with exactly the history the whole-tree path builds. `OXY_IMPORT_WHOLE_MERGES=1` takes the old path. |
|
| 6 | + | ||
| 7 | + | - **A binary file changed and made executable at once keeps both (#87).** `oxy commit` and the Git import dropped the executable bit when a binary file got new contents in the same change. |
|
| 8 | + | ||
| 9 | + | - **Several remotes and no origin (#83).** `core.remote` names the default remote; `bookmark list` compares with a remote that has the bookmark and names it; the error without a default says what to do. |
|
| 10 | + | ||
| 11 | + | - **Clearer messages.** A missing author identity says which config set it and how to pin the right one (#82); `oxy git verify --max-differences N` and a summary of what differs by kind. |
|
| 12 | + | ||
| 3 | 13 | ## 0.4.1 (2026-10-08) |
|
| 4 | 14 | ||
| 5 | 15 | - **The prompt agrees with status in a repository with subrepos (#75).** Straight after a commit or a merge, `oxy prompt` took a subrepo's directory for a recently changed file and showed `*` until a full `oxy status` ran. Subrepos are now compared by their pins. |
|
| … | 130 unchanged lines |
modified crates/oxy-core/src/repo/git.rs +7 −7
| … | 937 unchanged lines |
||
| 938 | 938 | let stop_after: Option<usize> = std::env::var("OXY_IMPORT_STOP_AFTER") |
|
| 939 | 939 | .ok() |
|
| 940 | 940 | .and_then(|v| v.parse().ok()); |
|
| 941 | - | // Merges built from the paths they can change (oxygen#80) only with |
|
| 942 | - | // OXY_IMPORT_PARTIAL_MERGES=1 until verified at VS Code's depth; |
|
| 943 | - | // otherwise from the whole tree, as before. |
|
| 944 | - | let partial_merges = |
|
| 945 | - | std::env::var_os("OXY_IMPORT_PARTIAL_MERGES").is_some_and(|v| v != "0"); |
|
| 941 | + | // Merges built from the paths they can change (oxygen#80): on VS |
|
| 942 | + | // Code at 139k commits the same 400 commits came out identical to |
|
| 943 | + | // whole-tree merges, with merges 3.2x faster. OXY_IMPORT_WHOLE_MERGES=1 |
|
| 944 | + | // builds them from the whole tree, for comparing. |
|
| 945 | + | let partial_merges = std::env::var_os("OXY_IMPORT_WHOLE_MERGES").is_none_or(|v| v == "0"); |
|
| 946 | 946 | let total = commits.len(); |
|
| 947 | 947 | for (index, gc) in commits.iter().enumerate() { |
|
| 948 | 948 | if known.imported.contains_key(&gc.sha) || known.exported.contains_key(&gc.sha) { |
|
| … | 141 unchanged lines |
||
| 1090 | 1090 | // paths in the first parent's tree and in the merged state. With |
|
| 1091 | 1091 | // them added it is built like an ordinary commit, instead of |
|
| 1092 | 1092 | // from its whole tree (18 s for any merge at 118k commits of |
|
| 1093 | - | // VS Code, oxygen#80). For now only with |
|
| 1094 | - | // OXY_IMPORT_PARTIAL_MERGES=1; otherwise the whole-tree path. |
|
| 1093 | + | // VS Code, oxygen#80). OXY_IMPORT_WHOLE_MERGES=1 takes the |
|
| 1094 | + | // whole-tree path. |
|
| 1095 | 1095 | let mut changed = changed; |
|
| 1096 | 1096 | // A tree conflict in the merged state (both sides placed a file |
|
| 1097 | 1097 | // at one path) is resolved by the whole-tree path. |
|
| … | 918 unchanged lines |