-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Performance: JGitUtil.getCommitLog returns too many commits on force-push #3476
Comments
But I also tried the following code, which I found on the internet. Maybe that's a better method to get the commit infos. But it cannot easily be swapped, as the behavior is different in non-standard cases.
I wrote the following tests, note the comments next to the cases. The
Overall, I don't know if it's worth changing to this method. |
I have a PR with a new implementation of Problem is, sometimes (e.g. new repo), I get commit names |
JGitUtil.getCommitLog returns too many commits
Impacted version: current
We have performance problems with our gitbucket instance. It's particularly bad when force-pushing a rebased branch. The biggest problem currently appears to be this:
When force-pushing,
JGitUtil.getCommitLog
is called with two commit ids. The first one (from), I think, is the commit of the old branch tip (before rebasing), the other one (to) is the new branch tip. The current implementation then walks backwards from the new branch tip to the root (full repository).I don't know where to fix this correctly. Probably the caller when doing the push should provide correct parameters to the method.
The text was updated successfully, but these errors were encountered: