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:
Shawn O. Pearce
2008-12-29 16:09:45 -08:00
parent 55d5e7c701
commit de867c73ce

View File

@@ -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);