mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-28 03:55:02 +03:00
move virtual branch constatns out of the core create
This commit is contained in:
parent
17b8214c5d
commit
0b1ecf7b54
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -2112,6 +2112,7 @@ dependencies = [
|
||||
"gitbutler-core",
|
||||
"hex",
|
||||
"itertools 0.13.0",
|
||||
"lazy_static",
|
||||
"md5",
|
||||
"serde",
|
||||
"tracing",
|
||||
|
@ -15,6 +15,7 @@ bstr = "1.9.1"
|
||||
md5 = "0.7.0"
|
||||
hex = "0.4.3"
|
||||
tracing = "0.1.40"
|
||||
lazy_static = "1.4.0"
|
||||
|
||||
[[test]]
|
||||
name="branch"
|
||||
|
@ -5,3 +5,12 @@ pub mod hunk;
|
||||
pub mod ownership;
|
||||
pub mod serde;
|
||||
pub mod target;
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
lazy_static! {
|
||||
pub static ref GITBUTLER_INTEGRATION_REFERENCE: gitbutler_core::git::LocalRefname =
|
||||
gitbutler_core::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";
|
||||
|
@ -26,6 +26,5 @@ pub mod ssh;
|
||||
pub mod storage;
|
||||
pub mod time;
|
||||
pub mod types;
|
||||
pub mod virtual_branches;
|
||||
#[cfg(target_os = "windows")]
|
||||
pub mod windows;
|
||||
|
@ -1,8 +0,0 @@
|
||||
use lazy_static::lazy_static;
|
||||
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";
|
@ -14,7 +14,7 @@ use std::{fs, path::PathBuf};
|
||||
use anyhow::Result;
|
||||
use tracing::instrument;
|
||||
|
||||
use gitbutler_core::virtual_branches::{
|
||||
use gitbutler_branch::{
|
||||
GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME,
|
||||
};
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
use anyhow::{Context, Result};
|
||||
use gitbutler_core::{
|
||||
fs::write,
|
||||
virtual_branches::{
|
||||
GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME,
|
||||
},
|
||||
use gitbutler_branch::{
|
||||
GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME,
|
||||
};
|
||||
use gitbutler_core::fs::write;
|
||||
use gix::config::tree::Key;
|
||||
use std::path::Path;
|
||||
|
||||
|
@ -18,9 +18,9 @@ use crate::conflicts::RepoConflicts;
|
||||
use crate::integration::{get_workspace_head, update_gitbutler_integration};
|
||||
use crate::remote::{commit_to_remote_commit, RemoteCommit};
|
||||
use crate::VirtualBranchHunk;
|
||||
use gitbutler_branch::GITBUTLER_INTEGRATION_REFERENCE;
|
||||
use gitbutler_core::error::Marker;
|
||||
use gitbutler_core::git;
|
||||
use gitbutler_core::virtual_branches::GITBUTLER_INTEGRATION_REFERENCE;
|
||||
use gitbutler_repo::rebase::cherry_rebase;
|
||||
|
||||
#[derive(Debug, Serialize, PartialEq, Clone)]
|
||||
|
@ -4,14 +4,14 @@ use anyhow::{anyhow, bail, Context, Result};
|
||||
use bstr::ByteSlice;
|
||||
|
||||
use gitbutler_branch::branch::BranchCreateRequest;
|
||||
use gitbutler_branch::{
|
||||
GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME,
|
||||
GITBUTLER_INTEGRATION_REFERENCE,
|
||||
};
|
||||
use gitbutler_branchstate::{VirtualBranchesAccess, VirtualBranchesHandle};
|
||||
use gitbutler_command_context::ProjectRepo;
|
||||
use gitbutler_core::error::Marker;
|
||||
use gitbutler_core::git::CommitExt;
|
||||
use gitbutler_core::virtual_branches::{
|
||||
GITBUTLER_INTEGRATION_COMMIT_AUTHOR_EMAIL, GITBUTLER_INTEGRATION_COMMIT_AUTHOR_NAME,
|
||||
GITBUTLER_INTEGRATION_REFERENCE,
|
||||
};
|
||||
use gitbutler_repo::{LogUntil, RepoActions, RepositoryExt};
|
||||
|
||||
use crate::conflicts;
|
||||
|
Loading…
Reference in New Issue
Block a user