Write index after committing

This commit is contained in:
Matthias Beyer 2016-09-08 14:16:08 +02:00
parent bee4c2002d
commit 0dc2baaee2

View file

@ -170,11 +170,17 @@ impl StoreIdAccessor for UpdateHook {
let message = try!(commit_message(cfg, StoreAction::Update) let message = try!(commit_message(cfg, StoreAction::Update)
.map_dbg_err_str("Failed to get commit message")); .map_dbg_err_str("Failed to get commit message"));
repo.commit(Some("HEAD"), &signature, &signature, &message, &tree, &parents) try!(repo.commit(Some("HEAD"), &signature, &signature, &message, &tree, &parents)
.map_dbg_str("Committed") .map_dbg_str("Committed")
.map_dbg_err_str("Failed to commit") .map_dbg_err_str("Failed to commit")
.map_err_into(GHEK::RepositoryCommittingError) .map_err_into(GHEK::RepositoryCommittingError)
.map_into_hook_error() .map_into_hook_error()
);
index.write()
.map_err_into(GHEK::RepositoryIndexWritingError)
.map_dbg_err_str("Failed to write tree")
.map_into_hook_error()
.map(|_| ()) .map(|_| ())
} }