diff options
| author | Mica White <botahamec@outlook.com> | 2026-03-28 14:28:42 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-03-28 14:28:42 -0400 |
| commit | c9d8448fcbc3e79668fc5d33bd4f1e33a3f3d25c (patch) | |
| tree | df081ffed90b13cd49151eb5cc0c8bedf2522cab /src/bin/init-autosave.rs | |
Init autosave command
Diffstat (limited to 'src/bin/init-autosave.rs')
| -rw-r--r-- | src/bin/init-autosave.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/init-autosave.rs b/src/bin/init-autosave.rs new file mode 100644 index 0000000..df3b66d --- /dev/null +++ b/src/bin/init-autosave.rs @@ -0,0 +1,10 @@ +use git2::Repository; +use git_autosave::{init, load_config, save_config}; + +fn main() -> Result<(), anyhow::Error> { + let repository = Repository::discover(".")?; + let mut config = load_config()?; + init(&repository, Some(&mut config))?; + save_config(&config)?; + Ok(()) +} |
