-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Use merge tree to improve conflict checking performance when possible #35542
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All old code (for SupportGitMergeTree=false) loses there test coverage?
// skip this test if git version is low | ||
if !git.DefaultFeatures().SupportProcReceive { | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think our CI env is that old, or any developer should use that old git to develop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imho, we need to define a minimum git version, and then the code can work based on that assumption.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here isn't really a problem (the if
check should be removed)
the real problem is SupportGitMergeTree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think our CI env is that old, or any developer should use that old git to develop.
Added this check so that the test will not fail when running in an old git env. Some manually tests needs it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SupportProcReceive means 2.29
Git 2.29 was officially released on October 19, 2020.
I don't think our CI env is that old, or any developer should use that old git to develop.
Some manually tests needs it.
Why? Who? Where?
In Git 2.38, the merge-tree command introduced the --write-tree option, which works directly on bare repositories. This option produces the merged tree object ID, allowing us to perform diffs between commits without creating a temporary repository. By avoiding the overhead of setting up and tearing down temporary repos, this approach delivers a notable performance improvement.