From 634f6da6186cd9bdcc0e3dde3a16085ad59536e3 Mon Sep 17 00:00:00 2001 From: Mica White Date: Sun, 29 Mar 2026 15:52:44 -0400 Subject: Added logging for commands --- src/lib.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index caa69b8..add6e56 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,9 +1,4 @@ /* - * git-autosave-daemon: - * - watch configuration directory - * - watch configured repositories - * - run autosave on change - * * git-restore-autosave: * - fetch upstream's autosaves * - filter to autosaves from the local user and branch @@ -27,6 +22,8 @@ * - error if there are unsaved changes * - apply `refs/autosave/undo` to tree * - allow force + * + * git repair-autosave */ use std::collections::{HashMap, HashSet}; @@ -82,7 +79,7 @@ pub fn save_config(config: &Config) -> Result<(), ConfyError> { confy::store("git-autosave", "git-autosaved", config) } -pub fn init(repository: &Repository, config: Option<&mut Config>) -> Result<(), git2::Error> { +pub fn init(repository: &Repository, config: Option<&mut Config>) -> Result { let id = Uuid::new_v4(); let workdir = repository.workdir(); repository @@ -95,7 +92,7 @@ pub fn init(repository: &Repository, config: Option<&mut Config>) -> Result<(), config.repositories.insert(workdir.into()); } - Ok(()) + Ok(id) } pub fn current_branch_ref(repository: &Repository) -> Result { -- cgit v1.2.3