ReceivePack: remove unnecessary try-catch around parseCommand
This exception is already handled in the outer catch block. Change-Id: Ifc04b8e138732a97b9c0ee323af923b8e52a7f8e
This commit is contained in:
parent
306932c701
commit
0373180321
|
@ -1115,13 +1115,7 @@ protected void recvCommands() throws IOException {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReceiveCommand cmd;
|
ReceiveCommand cmd = parseCommand(line);
|
||||||
try {
|
|
||||||
cmd = parseCommand(line);
|
|
||||||
} catch (PackProtocolException e) {
|
|
||||||
sendError(e.getMessage());
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
if (cmd.getRefName().equals(Constants.HEAD)) {
|
if (cmd.getRefName().equals(Constants.HEAD)) {
|
||||||
cmd.setResult(Result.REJECTED_CURRENT_BRANCH);
|
cmd.setResult(Result.REJECTED_CURRENT_BRANCH);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue