diff --git a/crates/gitbutler-branchstate/src/lib.rs b/crates/gitbutler-branchstate/src/lib.rs index 9f01daa2b..a2bfbf6b5 100644 --- a/crates/gitbutler-branchstate/src/lib.rs +++ b/crates/gitbutler-branchstate/src/lib.rs @@ -1,4 +1,4 @@ mod state; pub use state::VirtualBranches as VirtualBranchesState; -pub use state::VirtualBranchesAccess; +pub use state::VirtualBranchesExt; pub use state::VirtualBranchesHandle; diff --git a/crates/gitbutler-branchstate/src/state.rs b/crates/gitbutler-branchstate/src/state.rs index 71d696d76..b18ff7ded 100644 --- a/crates/gitbutler-branchstate/src/state.rs +++ b/crates/gitbutler-branchstate/src/state.rs @@ -57,11 +57,11 @@ pub struct VirtualBranchesHandle { file_path: PathBuf, } -pub trait VirtualBranchesAccess { +pub trait VirtualBranchesExt { fn virtual_branches(&self) -> VirtualBranchesHandle; } -impl VirtualBranchesAccess for Project { +impl VirtualBranchesExt for Project { fn virtual_branches(&self) -> VirtualBranchesHandle { VirtualBranchesHandle::new(self.gb_dir()) } diff --git a/crates/gitbutler-oplog/src/oplog.rs b/crates/gitbutler-oplog/src/oplog.rs index 6a1d0cd62..dcbbf43cf 100644 --- a/crates/gitbutler-oplog/src/oplog.rs +++ b/crates/gitbutler-oplog/src/oplog.rs @@ -2,7 +2,7 @@ use anyhow::{anyhow, bail, Context}; use git2::{DiffOptions, FileMode}; use gitbutler_branch::branch::Branch; use gitbutler_branch::diff::{hunks_by_filepath, FileDiff}; -use gitbutler_branchstate::{VirtualBranchesAccess, VirtualBranchesState}; +use gitbutler_branchstate::{VirtualBranchesExt, VirtualBranchesState}; use gitbutler_project::Project; use gitbutler_repo::RepositoryExt; use std::collections::HashMap; diff --git a/crates/gitbutler-sync/src/cloud.rs b/crates/gitbutler-sync/src/cloud.rs index cf607a6fe..12ba67b3e 100644 --- a/crates/gitbutler-sync/src/cloud.rs +++ b/crates/gitbutler-sync/src/cloud.rs @@ -4,7 +4,7 @@ use std::time; use anyhow::{anyhow, Context, Result}; use gitbutler_branch::target::Target; -use gitbutler_branchstate::VirtualBranchesAccess; +use gitbutler_branchstate::VirtualBranchesExt; use gitbutler_command_context::ProjectRepository; use gitbutler_error::error::Code; use gitbutler_id::id::Id; diff --git a/crates/gitbutler-testsupport/src/lib.rs b/crates/gitbutler-testsupport/src/lib.rs index f259c0d15..e011ae767 100644 --- a/crates/gitbutler-testsupport/src/lib.rs +++ b/crates/gitbutler-testsupport/src/lib.rs @@ -19,7 +19,7 @@ pub mod paths { pub mod virtual_branches { use gitbutler_branch::target::Target; - use gitbutler_branchstate::VirtualBranchesAccess; + use gitbutler_branchstate::VirtualBranchesExt; use gitbutler_command_context::ProjectRepository; use crate::empty_bare_repository; diff --git a/crates/gitbutler-virtual/src/actions.rs b/crates/gitbutler-virtual/src/actions.rs index 5ca879d27..253c3b30d 100644 --- a/crates/gitbutler-virtual/src/actions.rs +++ b/crates/gitbutler-virtual/src/actions.rs @@ -4,7 +4,7 @@ use gitbutler_branch::{ diff, ownership::BranchOwnershipClaims, }; -use gitbutler_branchstate::{VirtualBranchesAccess, VirtualBranchesHandle}; +use gitbutler_branchstate::{VirtualBranchesExt, VirtualBranchesHandle}; use gitbutler_command_context::ProjectRepository; use gitbutler_oplog::{ entry::{OperationKind, SnapshotDetails}, diff --git a/crates/gitbutler-virtual/src/base.rs b/crates/gitbutler-virtual/src/base.rs index 0766663b6..414264448 100644 --- a/crates/gitbutler-virtual/src/base.rs +++ b/crates/gitbutler-virtual/src/base.rs @@ -6,7 +6,7 @@ use gitbutler_branch::branch::{self, BranchId}; use gitbutler_branch::diff; use gitbutler_branch::ownership::BranchOwnershipClaims; use gitbutler_branch::target::Target; -use gitbutler_branchstate::{VirtualBranchesAccess, VirtualBranchesHandle}; +use gitbutler_branchstate::{VirtualBranchesExt, VirtualBranchesHandle}; use gitbutler_command_context::ProjectRepository; use gitbutler_project::FetchResult; use gitbutler_reference::{Refname, RemoteRefname}; diff --git a/crates/gitbutler-virtual/src/branch_manager.rs b/crates/gitbutler-virtual/src/branch_manager.rs index 47eb4bda7..c945e1361 100644 --- a/crates/gitbutler-virtual/src/branch_manager.rs +++ b/crates/gitbutler-virtual/src/branch_manager.rs @@ -13,7 +13,7 @@ use gitbutler_branch::{ diff, ownership::BranchOwnershipClaims, }; -use gitbutler_branchstate::VirtualBranchesAccess; +use gitbutler_branchstate::VirtualBranchesExt; use gitbutler_command_context::ProjectRepository; use gitbutler_commit::commit_headers::{CommitHeadersV2, HasCommitHeaders}; use gitbutler_error::error::Marker; diff --git a/crates/gitbutler-virtual/src/integration.rs b/crates/gitbutler-virtual/src/integration.rs index 7a7573ce1..09a51cd1c 100644 --- a/crates/gitbutler-virtual/src/integration.rs +++ b/crates/gitbutler-virtual/src/integration.rs @@ -8,7 +8,7 @@ use gitbutler_branch::{ GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME, GITBUTLER_INTEGRATION_REFERENCE, }; -use gitbutler_branchstate::{VirtualBranchesAccess, VirtualBranchesHandle}; +use gitbutler_branchstate::{VirtualBranchesExt, VirtualBranchesHandle}; use gitbutler_command_context::ProjectRepository; use gitbutler_commit::commit_ext::CommitExt; use gitbutler_error::error::Marker; diff --git a/crates/gitbutler-virtual/src/virtual.rs b/crates/gitbutler-virtual/src/virtual.rs index 4e6f7d52c..890974067 100644 --- a/crates/gitbutler-virtual/src/virtual.rs +++ b/crates/gitbutler-virtual/src/virtual.rs @@ -4,7 +4,7 @@ use gitbutler_branch::diff::{self, diff_files_into_hunks, trees, FileDiff, GitHu use gitbutler_branch::file_ownership::OwnershipClaim; use gitbutler_branch::hunk::{Hunk, HunkHash}; use gitbutler_branch::ownership::{reconcile_claims, BranchOwnershipClaims}; -use gitbutler_branchstate::{VirtualBranchesAccess, VirtualBranchesHandle}; +use gitbutler_branchstate::{VirtualBranchesExt, VirtualBranchesHandle}; use gitbutler_command_context::ProjectRepository; use gitbutler_commit::commit_ext::CommitExt; use gitbutler_commit::commit_headers::HasCommitHeaders; diff --git a/crates/gitbutler-virtual/tests/extra/mod.rs b/crates/gitbutler-virtual/tests/extra/mod.rs index 8180d68ea..802129cee 100644 --- a/crates/gitbutler-virtual/tests/extra/mod.rs +++ b/crates/gitbutler-virtual/tests/extra/mod.rs @@ -17,7 +17,7 @@ use gitbutler_branch::{ ownership::BranchOwnershipClaims, target::Target, }; -use gitbutler_branchstate::VirtualBranchesAccess; +use gitbutler_branchstate::VirtualBranchesExt; use gitbutler_commit::{commit_ext::CommitExt, commit_headers::CommitHeadersV2}; use gitbutler_reference::{Refname, RemoteRefname}; use gitbutler_repo::RepositoryExt; diff --git a/crates/gitbutler-virtual/tests/virtual_branches/oplog.rs b/crates/gitbutler-virtual/tests/virtual_branches/oplog.rs index 3206035bf..9c19bba29 100644 --- a/crates/gitbutler-virtual/tests/virtual_branches/oplog.rs +++ b/crates/gitbutler-virtual/tests/virtual_branches/oplog.rs @@ -1,5 +1,5 @@ use super::*; -use gitbutler_branchstate::VirtualBranchesAccess; +use gitbutler_branchstate::VirtualBranchesExt; use gitbutler_oplog::oplog::Oplog; use itertools::Itertools; use std::io::Write;