diff options
| author | Mica White <botahamec@outlook.com> | 2026-03-29 10:54:31 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-03-29 10:54:31 -0400 |
| commit | 604d3be6dc04892cdef71935d1117855c1cc7bb4 (patch) | |
| tree | 7f3aef3e2ae263355c94faa4da445898434ffb7c /src/bin/git-init-autosave.rs | |
| parent | 766ef91c4b4226a645583eff311d2868cab28bc0 (diff) | |
Get password from root config
Diffstat (limited to 'src/bin/git-init-autosave.rs')
| -rw-r--r-- | src/bin/git-init-autosave.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/git-init-autosave.rs b/src/bin/git-init-autosave.rs new file mode 100644 index 0000000..df3b66d --- /dev/null +++ b/src/bin/git-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(()) +} |
