Error out during receive of new changes if no new commits are found
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -294,6 +294,11 @@ class Receive extends AbstractGitCommand {
|
||||
newChange.setResult(Result.REJECTED_MISSING_OBJECT);
|
||||
}
|
||||
|
||||
if (toCreate.isEmpty()) {
|
||||
reject(newChange, "no new changes");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
for (final RevCommit c : toCreate) {
|
||||
createChange(walk, c);
|
||||
|
||||
Reference in New Issue
Block a user