diff --git a/crates/gitbutler-core/src/ops/oplog.rs b/crates/gitbutler-core/src/ops/oplog.rs index bafe8ffc4..56fde841f 100644 --- a/crates/gitbutler-core/src/ops/oplog.rs +++ b/crates/gitbutler-core/src/ops/oplog.rs @@ -10,10 +10,9 @@ use anyhow::Result; use tracing::instrument; use crate::git::diff::FileDiff; -use crate::virtual_branches::integration::{ - GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME, +use crate::virtual_branches::{ + Branch, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME, }; -use crate::virtual_branches::Branch; use crate::{git::diff::hunks_by_filepath, git::RepositoryExt, projects::Project}; use super::{ diff --git a/crates/gitbutler-core/src/ops/reflog.rs b/crates/gitbutler-core/src/ops/reflog.rs index 2a64f4e3e..ea479496b 100644 --- a/crates/gitbutler-core/src/ops/reflog.rs +++ b/crates/gitbutler-core/src/ops/reflog.rs @@ -1,12 +1,13 @@ -use crate::fs::write; +use crate::{ + fs::write, + virtual_branches::{ + GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME, + }, +}; use anyhow::{Context, Result}; use gix::config::tree::Key; use std::path::Path; -use crate::virtual_branches::integration::{ - GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME, -}; - /// Sets a reference to the oplog head commit such that snapshots are reachable and will not be garbage collected. /// We want to achieve 2 things: /// - The oplog must not be visible in `git log --all` as branch diff --git a/crates/gitbutler-core/src/virtual_branches/integration.rs b/crates/gitbutler-core/src/virtual_branches/integration.rs index 9cebc7400..f54c29f4a 100644 --- a/crates/gitbutler-core/src/virtual_branches/integration.rs +++ b/crates/gitbutler-core/src/virtual_branches/integration.rs @@ -3,7 +3,10 @@ use std::{path::PathBuf, vec}; use anyhow::{anyhow, bail, Context, Result}; use bstr::ByteSlice; -use super::{VirtualBranchesHandle, GITBUTLER_INTEGRATION_REFERENCE}; +use super::{ + VirtualBranchesHandle, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, + GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME, GITBUTLER_INTEGRATION_REFERENCE, +}; use crate::error::Marker; use crate::git::RepositoryExt; use crate::{ @@ -13,8 +16,6 @@ use crate::{ }; const WORKSPACE_HEAD: &str = "Workspace Head"; -pub const GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME: &str = "GitButler"; -pub const GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL: &str = "gitbutler@gitbutler.com"; pub fn get_integration_commiter<'a>() -> Result> { Ok(git2::Signature::now( diff --git a/crates/gitbutler-core/src/virtual_branches/mod.rs b/crates/gitbutler-core/src/virtual_branches/mod.rs index 45d95e3c5..f13ffca39 100644 --- a/crates/gitbutler-core/src/virtual_branches/mod.rs +++ b/crates/gitbutler-core/src/virtual_branches/mod.rs @@ -25,3 +25,6 @@ lazy_static! { pub static ref GITBUTLER_INTEGRATION_REFERENCE: crate::git::LocalRefname = crate::git::LocalRefname::new("gitbutler/integration", None); } + +pub const GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME: &str = "GitButler"; +pub const GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL: &str = "gitbutler@gitbutler.com";