mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-08-17 00:00:31 +03:00
move remaining integration constants to core
This commit is contained in:
parent
0865521f90
commit
f224207029
@ -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::{
|
||||
|
@ -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
|
||||
|
@ -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<git2::Signature<'a>> {
|
||||
Ok(git2::Signature::now(
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user