Actually return failure to clients if new change creation failed
If a new change creation failed we were overwriting the result with OK, which was wrong. The client should know we rejected the push as something failed our end. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -585,9 +585,11 @@ class Receive extends AbstractGitCommand {
|
||||
} catch (IOException e) {
|
||||
log.error("Error computing patch of commit " + c.name(), e);
|
||||
reject(newChange, "diff error");
|
||||
return;
|
||||
} catch (OrmException e) {
|
||||
log.error("Error creating change for commit " + c.name(), e);
|
||||
reject(newChange, "database error");
|
||||
return;
|
||||
}
|
||||
}
|
||||
newChange.setResult(ReceiveCommand.Result.OK);
|
||||
|
Reference in New Issue
Block a user