mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-05 17:15:19 +03:00
reuse the commit-graph between runs
This time, it contains whole commits and only flags are reset between runs. With this amount of re-use, it will manage to rival `git2`.
This commit is contained in:
parent
c2decbbdc7
commit
06edec70cb
@ -517,13 +517,14 @@ pub fn get_branch_listing_details(
|
||||
let mut repo = repo.to_thread_local();
|
||||
repo.object_cache_size_if_unset(50 * 1024 * 1024);
|
||||
let cache = repo.commit_graph_if_enabled()?;
|
||||
let mut graph = repo.revision_graph(cache.as_ref());
|
||||
for (other_branch_commit_id, branch_head) in all_other_branch_commit_ids {
|
||||
let branch_head = git2_to_gix_object_id(branch_head);
|
||||
let base = repo
|
||||
.merge_base_with_cache(
|
||||
.merge_base_with_graph(
|
||||
git2_to_gix_object_id(other_branch_commit_id),
|
||||
branch_head,
|
||||
cache.as_ref(),
|
||||
&mut graph,
|
||||
)
|
||||
.ok()
|
||||
.map(gix::Id::detach);
|
||||
|
Loading…
Reference in New Issue
Block a user