Runtime::ensure_cfg_branch_is_checked_out() should check whether config enforces this
This commit is contained in:
parent
73c0f080ac
commit
cae605d21b
1 changed files with 5 additions and 0 deletions
|
@ -91,6 +91,11 @@ impl Runtime {
|
|||
/// Ensure that the branch that is put in the configuration file is checked out, if any.
|
||||
pub fn ensure_cfg_branch_is_checked_out(&self, action: &StoreAction) -> HookResult<()> {
|
||||
use vcs::git::config::ensure_branch;
|
||||
use vcs::git::config::do_checkout_ensure_branch;
|
||||
|
||||
if !do_checkout_ensure_branch(self.config.as_ref()) {
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
debug!("[GIT {} HOOK]: Ensuring branch checkout", action.uppercase());
|
||||
let head = try!(self
|
||||
|
|
Loading…
Reference in a new issue