Abort the execution of the UpdateHook if repo isnt dirty

This commit is contained in:
Matthias Beyer 2016-09-17 18:58:05 +02:00
parent eb378d47c2
commit b2a0758b1a

View file

@ -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)