diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/UploadArchive.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/UploadArchive.java index 379ee4bae7..c3dae3ae84 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/UploadArchive.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/UploadArchive.java @@ -162,7 +162,7 @@ public class UploadArchive extends AbstractGitCommand { // Find out the object to get from the specified reference and paths ObjectId treeId = repo.resolve(options.treeIsh); - if (treeId.equals(ObjectId.zeroId())) { + if (treeId == null) { throw new Failure(4, "fatal: reference not found"); }