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
@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.

@lunny
Copy link
Member Author

lunny commented Oct 7, 2025

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

It's ready to review again.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged labels Oct 7, 2025
@lunny lunny requested a review from wxiaoguang October 9, 2025 04:52
@wxiaoguang wxiaoguang removed their request for review October 9, 2025 07:19
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Oct 9, 2025

  • I don't think it's right to use integration tests to test "gitrepo" related code.
  • I don't think it's right to use a general name like "DiffTree" but its implementation is for a special purpose.
  • Why "doGitCommit" comes again? I have told you. So many many times, don't just copy-paste code!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to 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