UploadArchive: Correct check for tree-ish not found

Repository#resolve(String) returns null, not zeroId, if it couldn't
resolve.

Coverity-CID: 80898
Change-Id: I29e20c94cb4848241a06e41d78f033e06ae84eba
This commit is contained in:
Dave Borowitz 2015-09-03 11:02:35 -04:00
parent 2d63027477
commit 9e3fa80919

View File

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