-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
octopus-merge (part 2: blob-merge) #1585
Draft
Byron
wants to merge
6
commits into
main
Choose a base branch
from
merge
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,288
−7
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Byron
changed the title
octopus-merge (part 2: blob-diff)
octopus-merge (part 2: blob-merge)
Sep 11, 2024
@EliahKagan Just as a note in case you'd like to submit a first patch to Git that will definitely be able to land, maybe to warm-up with the mailing-list workflow, then I have something for you. The attribute-documentation about three-way merges contains a reference to However, the git-config documentation doesn't mention it at all. |
Byron
force-pushed
the
merge
branch
3 times, most recently
from
September 13, 2024 12:13
0ae3791
to
ff0975c
Compare
Byron
commented
Sep 13, 2024
Byron
force-pushed
the
merge
branch
3 times, most recently
from
September 14, 2024 07:39
22e88d7
to
75bbe2b
Compare
That way it's easy to determine if a worktree root has any root set.
Byron
force-pushed
the
merge
branch
3 times, most recently
from
September 15, 2024 05:39
f7643ae
to
917e52a
Compare
Byron
force-pushed
the
merge
branch
8 times, most recently
from
September 18, 2024 14:27
2f9c91b
to
a6678f9
Compare
…sts for correctness.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement an octopus merge based on trees, and (mostly) equivalent to
merge-ORT
in Git. The foundation, tree-editing, was implemented in #1566.Related to gitbutlerapp/gitbutler#4793.
Tasks
This PR was re-focussed on blob-based conflict detection and the generation of blob merge-results with conflict markers.
flattenBringmerge
intoplatform
API, similar to how it's done indiff
merge::State
to being able to execute the merge.Pipeline
implementation and testsPlatform
implementation and tests%P
argument for merge-drivers is needed for it to get through to the driver programGIT_REFLOG_ACTION
,GIT_EXEC_PATH
andGIT_PREFIX
can be passedmerge
stylediff3
stylezdiff3
stylediff3-conflict-markers.sh
(some special cases)merge-file
(less simplistic input)<<<
lines that the text merge is adding? Probably configurable?gix-diff
.Questions
Next PR / Outscoped
textconv
with context, see this gist for details.GIT_DIR
set, others do.gix-command::Context
.libgit2
also doesn't try it.diff3-conflict-markers.sh
- be sure to capture the 'empty tree' label , but also other special casesgix
at least.Research
Everything is about MergeORT.
git2::MergeOptions
.Crates
Mostly for performance optimization, also interesting for handling the index, and the tree::editor types.
Building Blocks for String Interning
yoke
.bumpalo
, but returns an index to the item, can also remove things. Strings aren't really supported though (i.e. variable length slices)String Interining
&str
https://lib.rs/crates/interned- also for&[u8]
- but leaks the data to get pointer comparisonArenaInterner
also for[u8]
Handle Special Cases
Questions
Is
git2::merge_trees()
a trivial merge? Does it handle all the cases of MergeORT?Maybe not, but it definitely handles rename tracking. See these
git2
flags for more information.How does rename-tracking affect a tree-merge?
The first round is done without renames, then there is a second round to find renames, and perform the merge of renamed items.
How is an octopus merge implemented, particularly with Merge ORT?
References
Removed Utility
Prints a patch with context 3, using bytes only, based on imara-diff.