pub struct GriptreeConfig {
pub branch: String,
pub path: String,
pub created_at: DateTime<Utc>,
pub created_by: Option<String>,
pub locked: bool,
pub locked_at: Option<DateTime<Utc>>,
pub locked_reason: Option<String>,
pub repo_upstreams: HashMap<String, String>,
}Expand description
Griptree configuration (stored in .gitgrip/griptrees/
Fields§
§branch: StringBranch name this griptree is for
path: StringAbsolute path to griptree directory
created_at: DateTime<Utc>ISO timestamp when created
created_by: Option<String>User who created it
locked: boolPrevents accidental removal
locked_at: Option<DateTime<Utc>>ISO timestamp when locked
locked_reason: Option<String>Reason for locking
repo_upstreams: HashMap<String, String>Per-repo upstream branch mapping (e.g., origin/main, origin/dev)
Implementations§
Source§impl GriptreeConfig
impl GriptreeConfig
Sourcepub fn load(path: &PathBuf) -> Result<Self, GriptreeError>
pub fn load(path: &PathBuf) -> Result<Self, GriptreeError>
Load config from a file
Sourcepub fn load_from_workspace(
workspace_root: &Path,
) -> Result<Option<Self>, GriptreeError>
pub fn load_from_workspace( workspace_root: &Path, ) -> Result<Option<Self>, GriptreeError>
Load griptree config from a workspace root (if present)
Sourcepub fn upstream_for_repo(
&self,
repo_name: &str,
revision: &str,
) -> Result<String, GriptreeError>
pub fn upstream_for_repo( &self, repo_name: &str, revision: &str, ) -> Result<String, GriptreeError>
Resolve upstream branch for a repo, falling back to origin/
Trait Implementations§
Source§impl Clone for GriptreeConfig
impl Clone for GriptreeConfig
Source§impl Debug for GriptreeConfig
impl Debug for GriptreeConfig
Source§impl<'de> Deserialize<'de> for GriptreeConfig
impl<'de> Deserialize<'de> for GriptreeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GriptreeConfig
impl RefUnwindSafe for GriptreeConfig
impl Send for GriptreeConfig
impl Sync for GriptreeConfig
impl Unpin for GriptreeConfig
impl UnsafeUnpin for GriptreeConfig
impl UnwindSafe for GriptreeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FromResponse for Twhere
T: DeserializeOwned,
impl<T> FromResponse for Twhere
T: DeserializeOwned,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more