-
Notifications
You must be signed in to change notification settings - Fork 547
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 improvements and bug fixes #4793
Conversation
@Byron is attempting to deploy a commit to the GitButler Team on Vercel. A member of the Team first needs to authorize it. |
the |
c39a948
to
81bd7ef
Compare
…iles. The reason for this is that now the outcome of this can be re-used in `list_virtual_branches`, which is sensitive to seeing the latest vbranch state which is not a given. Calculating it makes sure there is no mismatch, and probably "can't be wrong". Also note that `head_commit()` is still kept around as it's the idea to eventually use it more.
Usually this makes the affected code simpler.
This is relevant when all commits are equal by tree, but seem changed due to the added GitButler headers. For added safety, we also compare by commit message, date and authors, basically everything that isn't the headers.
@Byron this seems to break amending of commits. If I have a virtual branch with an upstream and I amend the only commit it stays local and remote instead of becoming local (which can be force pushed). |
Thanks for letting me know! I think this means that a patch-id also has to be computed to detect such changes. And that would make this operation quite expensive even though I think it can easily be accelerated by using all cores, i.e. compute patches in parallel. |
Hey thanks for responding so quickly. Iiuc we would want to display the list as if the branch was rebased, but it's difficult since the remote id's don't necessarily have change id's? It feels like checking author, committer, and message is the right way to accomplish this, so I'm thinking the problem is in the front-end code. Instead of identifying the commit existing on both local and remote, it should be identified as local, but having been rebased. Let me see if I can fix this! |
See #4807! |
This PR is planned as follow-up to #4771, even though it chooses to pick other low-hanging fruit first.
This means, adding more instrumentation to find long-running functions or functions that run more than once in the same operation.
From there, one can avoid duplication, and optimize specific cases while keeping
git2
, at least at first.Probably this will lead to this PR being merged early as it aims to deliver more small improvements while guiding the way towards
bigger improvements that would require
gix
, along with some upgrades to it which may take more time.Tasks
list_remote_branches()
(nowlist_local_branches()
)From
To
Notes for the reviewer
And actually, it turned out that this is a similar looking, but different, commit, so it's correct after all.
Follow-Up
is_commit_integrated()
- octopus merge with trees as resultsNotes
list_local_branches()
(formerlylist_remote_branches()
) is used to build a combined branches view, similar what the newlist_branches
does. It's hard for me to see how it's used, and it am surprised this information is still used anywhere as the side-bar definitely uses the newbranch_listing
now.Issues
These issues where created while processing this PR.
Delete Branch
can be triggered multiple times #4794References