diff options
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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<Uuid, git2::Error> { 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<String, git2::Error> { |
