diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-09-18 18:34:01 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-09-19 09:28:22 +0200 |
commit | 4a0def0ede9c94609999f6e93cad5c9e25373c48 (patch) | |
tree | 64b35f36f335093406facd9f502f837295c2672b /libimagstorestdhook | |
parent | a4cdb2b8731c1eea031af397aecd3fe657d6c889 (diff) |
Fix debug messages in Runtime::ensure_cfg_branch_is_checked_out()
Diffstat (limited to 'libimagstorestdhook')
-rw-r--r-- | libimagstorestdhook/src/vcs/git/runtime.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libimagstorestdhook/src/vcs/git/runtime.rs b/libimagstorestdhook/src/vcs/git/runtime.rs index b35a453f..a306c83c 100644 --- a/libimagstorestdhook/src/vcs/git/runtime.rs +++ b/libimagstorestdhook/src/vcs/git/runtime.rs @@ -92,40 +92,40 @@ impl Runtime { pub fn ensure_cfg_branch_is_checked_out(&self, action: &StoreAction) -> HookResult<()> { use vcs::git::config::ensure_branch; - debug!("[GIT CREATE HOOK]: Ensuring branch checkout"); + debug!("[GIT {} HOOK]: Ensuring branch checkout", action.uppercase()); let head = try!(self .repository(action) .and_then(|r| { - debug!("Repository fetched, getting head"); + debug!("[GIT {} HOOK]: Repository fetched, getting head", action.uppercase()); r.head() .map_dbg_err_str("Couldn't fetch HEAD") .map_dbg_err(|e| format!("\tbecause = {:?}", e)) .map_err_into(GHEK::HeadFetchError) .map_err(|e| e.into()) })); - debug!("HEAD fetched"); + debug!("[GIT {} HOOK]: HEAD fetched", action.uppercase()); // TODO: Fail if not on branch? hmmh... I'm not sure if !head.is_branch() { - debug!("HEAD is not a branch"); + debug!("[GIT {} HOOK]: HEAD is not a branch", action.uppercase()); return Err(GHEK::NotOnBranch.into_error().into()); } - debug!("HEAD is a branch"); + debug!("[GIT {} HOOK]: HEAD is a branch", action.uppercase()); // Check out appropriate branch ... or fail match ensure_branch(self.config.as_ref()) { Ok(Some(s)) => { - debug!("We have to ensure branch: {}", s); + debug!("[GIT {} HOOK]: We have to ensure branch: {}", action.uppercase(), s); match head.name().map(|name| { - debug!("{} == {}", name, s); + debug!("[GIT {} HOOK]: {} == {}", action.uppercase(), name, s); name == s }) { Some(b) => { if b { - debug!("Branch already checked out."); + debug!("[GIT {} HOOK]: Branch already checked out.", action.uppercase()); Ok(()) } else { - debug!("Branch not checked out."); + debug!("[GIT {} HOOK]: Branch not checked out.", action.uppercase()); unimplemented!() } }, @@ -136,7 +136,7 @@ impl Runtime { } }, Ok(None) => { - debug!("No branch to checkout"); + debug!("[GIT {} HOOK]: No branch to checkout", action.uppercase()); Ok(()) }, |