pub struct PerRepoConfig {
pub schema: String,
pub project_name: Option<String>,
pub ignore: bool,
pub disable_hooks: bool,
pub disable_daemon: bool,
pub override_idle_days: Option<u64>,
pub min_size_mb: Option<u64>,
pub scan_depth: Option<usize>,
}Expand description
Structured per-repository configuration file stored inside repo roots as .devprune.json.
Fields§
§schema: StringJSON Schema reference URL for IDE IntelliSense and validation.
project_name: Option<String>Custom display name for this project in TUI and CLI status views.
ignore: boolWhether this repository is ignored/excluded from pruning.
disable_hooks: boolDisable global Git auto-registration hooks for this specific workspace.
disable_daemon: boolDisable background daemon automated pruning pass for this specific workspace.
override_idle_days: Option<u64>Custom override for idle days threshold (overrides global settings).
min_size_mb: Option<u64>Custom override for the size floor, in MiB (overrides global min_size_mb).
Some(0) is a meaningful value: it turns the floor off for this repository even
when a global floor is set.
scan_depth: Option<usize>Custom override for how deep discovery walks this repository.
The setting that most often needs to differ per repository rather than globally:
one deeply-nested monorepo should not make every other repository pay for a
deeper walk. Clamped to constants::MAX_SCAN_DEPTH_LIMIT like the global one.
Implementations§
Source§impl PerRepoConfig
impl PerRepoConfig
Sourcepub fn load_with_diagnostics(repo_path: &Path) -> Result<Option<Self>, String>
pub fn load_with_diagnostics(repo_path: &Path) -> Result<Option<Self>, String>
Load per-repo config from .devprune.json, or None when there is no such file.
This is the only loader. There used to be a second one that returned None for a
file that failed to parse as well as for one that was absent, and every caller of
it then went on to act as though the repository had no configuration: the prune
pass ignored an "ignore": true it could not read, and the two workspace toggles
wrote a fresh default file straight over the user’s broken one, taking every
override in it with them. A caller that genuinely does not care — the display-name
lookup — says so with .ok().flatten().
Sourcepub fn save_to_repo(&self, repo_path: &Path) -> Result<()>
pub fn save_to_repo(&self, repo_path: &Path) -> Result<()>
Save per-repo config to .devprune.json in the repo root, and record it in the
repository’s .git/info/exclude so it never shows up in git status.
Trait Implementations§
Source§impl Clone for PerRepoConfig
impl Clone for PerRepoConfig
Source§fn clone(&self) -> PerRepoConfig
fn clone(&self) -> PerRepoConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PerRepoConfig
impl Debug for PerRepoConfig
Source§impl Default for PerRepoConfig
impl Default for PerRepoConfig
Source§impl<'de> Deserialize<'de> for PerRepoConfig
impl<'de> Deserialize<'de> for PerRepoConfig
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>,
Source§impl PartialEq for PerRepoConfig
impl PartialEq for PerRepoConfig
Source§impl Serialize for PerRepoConfig
impl Serialize for PerRepoConfig
impl StructuralPartialEq for PerRepoConfig
Auto Trait Implementations§
impl Freeze for PerRepoConfig
impl RefUnwindSafe for PerRepoConfig
impl Send for PerRepoConfig
impl Sync for PerRepoConfig
impl Unpin for PerRepoConfig
impl UnsafeUnpin for PerRepoConfig
impl UnwindSafe for PerRepoConfig
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
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> 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> ⓘ
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> ⓘ
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