Abort the execution of the UpdateHook if repo isnt dirty
This commit is contained in:
parent
eb378d47c2
commit
b2a0758b1a
1 changed files with 7 additions and 0 deletions
|
@ -106,6 +106,13 @@ impl StoreIdAccessor for UpdateHook {
|
|||
let repo = try!(self.runtime.repository(&action));
|
||||
let mut index = try!(fetch_index(repo, &action));
|
||||
|
||||
if !self.runtime.repo_is_dirty(&index) {
|
||||
debug!("[GIT UPDATE HOOK]: Repository seems to be clean. I'm done.");
|
||||
return Ok(())
|
||||
} else {
|
||||
debug!("[GIT UPDATE HOOK]: Repository seems to be dirty. Continuing.");
|
||||
}
|
||||
|
||||
let signature = try!(
|
||||
repo.signature()
|
||||
.map_err_into(GHEK::MkSignature)
|
||||
|
|
Loading…
Reference in a new issue