Skip to content
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

HasPreviousCommit causes recursive load of commits unnecessarily #14598

Merged

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Feb 7, 2021

This PR improves HasPreviousCommit to prevent the automatic and recursive loading
of previous commits using git merge-base --is-ancestor and git rev-list

Fix #13684
Fix #13423

Signed-off-by: Andrew Thornton [email protected]

This PR improves HasPreviousCommit to prevent the automatic and recursive loading
of previous commits using git merge-base --is-ancestor and git rev-list

Related go-gitea#13684

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added this to the 1.14.0 milestone Feb 7, 2021
@zeripath
Copy link
Contributor Author

zeripath commented Feb 7, 2021

I think this is actually going to fix the associated problem.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 7, 2021
modules/git/commit.go Outdated Show resolved Hide resolved
@lunny
Copy link
Member

lunny commented Feb 8, 2021

@zeripath Could you add some tests for this?

@zeripath
Copy link
Contributor Author

zeripath commented Feb 8, 2021

@lunny test added

@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 Feb 9, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 10, 2021
@zeripath
Copy link
Contributor Author

Make lgtm work

@zeripath zeripath merged commit f9abf94 into go-gitea:master Feb 10, 2021
@zeripath zeripath deleted the fix-13684-improve-has-previouscommit branch February 10, 2021 07:01
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 11, 2021
…gitea#14598)

Backport go-gitea#14598

This PR improves HasPreviousCommit to prevent the automatic and recursive loading
of previous commits using git merge-base --is-ancestor and git rev-list

Fix go-gitea#13684

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added the backport/done All backports for this PR have been created label Feb 11, 2021
lafriks pushed a commit that referenced this pull request Feb 14, 2021
) (#14649)

This PR improves HasPreviousCommit to prevent the automatic and recursive loading
of previous commits using git merge-base --is-ancestor and git rev-list

Fix #13684

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: 6543 <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't change branch in pull request Request to change PR target branch (merge-base) sometimes does not work
5 participants