diff options
Diffstat (limited to 'src/bin/git-autosave.rs')
| -rw-r--r-- | src/bin/git-autosave.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/git-autosave.rs b/src/bin/git-autosave.rs index 64ffd67..4a85206 100644 --- a/src/bin/git-autosave.rs +++ b/src/bin/git-autosave.rs @@ -8,16 +8,19 @@ fn main() -> Result<(), anyhow::Error> { let config: &'static mut Config = Box::leak(Box::new(git_autosave::load_config()?)); if std::env::args().any(|arg| arg == "--init") { - git_autosave::init(&repository, Some(config))?; + let id = git_autosave::init(&repository, Some(config))?; git_autosave::save_config(config)?; + println!("Initialized autosave for repository: {id}"); } let auth = GitAuthenticator::new().set_prompter(Inquirer(config)); let mut callbacks = RemoteCallbacks::new(); callbacks.credentials(auth.credentials(&gitconfig)); - commit_autosave(&repository)?; + let commit = commit_autosave(&repository)?; + println!("Commited autosave: {commit}"); push_autosaves(&repository, callbacks)?; + println!("Successfully pushed autosave to remote"); Ok(()) } |
