Skip to content

Conversation

lunny
Copy link
Member

@lunny lunny commented Sep 27, 2025

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.

@lunny lunny added this to the 1.26.0 milestone Sep 27, 2025
@lunny lunny added the performance/speed performance issues with slow downs label Sep 27, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 27, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Sep 27, 2025
@lunny lunny marked this pull request as ready for review September 29, 2025 23:22
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 2, 2025
Copy link
Contributor

@wxiaoguang wxiaoguang left a 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?

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 2, 2025
Comment on lines 518 to 521
// skip this test if git version is low
if !git.DefaultFeatures().SupportProcReceive {
return
}
Copy link
Contributor

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.

Copy link
Member

@silverwind silverwind Oct 2, 2025

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.

Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Contributor

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?

@lunny
Copy link
Member Author

lunny commented Oct 4, 2025

All old code (for SupportGitMergeTree=false) loses there test coverage?

af79992 and e8636b7 added the two types of tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged modifies/go Pull requests that update Go code performance/speed performance issues with slow downs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants