git-p4: clean up after p4 submit failure
When "p4 submit" command fails in P4Submit.applyCommit, the workspace is left with the changes. We already have code to revert the changes to the workspace when the user decides to cancel submission by aborting the editor that edits the change description, and we should treat the "p4 submit" failure the same way. Clean the workspace if p4_write_pipe raised SystemExit, so that the user don't have to do it themselves. Signed-off-by: NGIRARD Etienne <egirard@murex.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com> Signed-off-by: NLuke Diamand <luke@diamand.org> Signed-off-by: NJeff King <peff@peff.net>
Showing
想要评论请 注册 或 登录