-
-
Couldn't load subscription status.
- Fork 394
tree merge with tree-related auto-resolution #1705
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
Merged
Conversation
This file contains hidden or 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
… to indicate auto-resolution. Previously it wasn't possible to detect auto-resolution, even though it can be assumed if a resolution mode was provided.
5169947 to
2b639aa
Compare
…conflicts`. That way it's possible to steer how to resolve tree-related conflicts while making it possible to detect that a conflict happened.
c5c6512 to
a82f3f2
Compare
13 tasks
35226fc to
ad9d484
Compare
…urs' or 'ancestor'
That way it's possible to control how tree-conflicts should be auto-resolved.
With it one can decide which side to favor in case of irreconcilable tree-conflicts.
Previously, the lock location would block all writers from executing a fixture even though they wouldn't step on each others feet. Now, a script destination is used to assure locks are created close to the destination when creating writable fixtures, typically removing the need for multiple writers to wait on each other unnecessarily.
… `Id`. This makes these types easier to use as it's enough to pass a wrapped type to perform more actions on the underlying repository.
Previously it was impossible to tell if rename tracking was disabled, or if it was unset, which leads to incorrect logic. This changes the signature of `diff::new_rewrites()` to also provide information about whether or not it was configured.
The problem here is that our implementation avoids using a hashmap, but pays the price by having bad performance if there are too many possible candidates (binary search doesn't seem to be up to the task). This can lead to impossibly long runtimes, so for now, limit it explicitly.
…ave unconflicted *and* conflicted entries. This is a massive footgun currently where incorrect usage is very likely while causing all kinds of mistakes.
Previously it was possible to mark perfectly working content merges as conflicting if we would choose 'our' or 'their' resolution.
Empty files are equivalent to having no content, which also means such files have no identity to speak off. This definitely helps with false positives of `.gitignore` for instance, which can be empty to tell Git to track a directory. On top of that, Git has a heuristic to do rename tracking of small files by similarity as the similarity may be off of files just have a couple of lines to speak about. Note that empty files that are renamed as part of a whole directory will still be tracked as renames.
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.
Make it possible to resolve tree-conflicts with
ourswhile making it possible to notice that a conflict would otherwise have occurred.The idea is that one wants to produce a suitable tree while noticing that a conflict would have occurred if we wouldn't have resolved it.
Follow-up of #1661.
Tasks
ancestorusecase andoursis coveredoursandancestorswithA-BandB-Aorder.gix.gix merge tree/commit, start sharing settings inclapas well.whatever/emptyinsimple)todo!()anddbg!Implementation Notes
ancestorcase, so it's not always as good as it can possibly be, fortunately in what I would call 'niche' situations. In practice, it's only used for merging virtual merge bases.merge.directoryRenamesisn't implemented, even though Git has a handle for that. We could respect the setting by deciding what should be a conflict, even though right now we always track directory renames.Possible Tasks
libgit2also doesn't try it.textconvwith context, see this gist for details.GIT_DIRset, others do.gix-command::Context.Make blob-merge based conflict handling possible in the tree merge from- not needed for nowgixat least.Archive
Previous Research (index creation)
record_conflicted_entries()sets the index to match what was recorded.gitoxidecan checkout a tree as well (while keeping the index in memory).checkout()by tree-id, with auto-updates to the index, in-memory.Everything is about MergeORT.
ability to re-use object caches of a repo that has seen the base-tree already, but overall, who knows*
-X oursfor instance don't affect tree-related auto-resolutions, just the ones related to content. This could be implemented when there is demand though.merge-ORTcannot properly handle renames within renamed directories, ending up with the source of the subdir-rename still present.git2::MergeOptions.