Update JGit to 0.8.4.312-g6517a7c

This resolves an incorrect data corruption error when packing
objects for transport that are delta encoded.

Change-Id: Ic501a46e31595dd08bccf9469c0b139671b9dc12
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-08-26 10:54:50 -07:00
parent f7e03ee787
commit e28983ab26
5 changed files with 33 additions and 17 deletions

View File

@@ -19,7 +19,7 @@ import com.google.gerrit.server.util.HostPlatform;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheBuilder;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.lib.Commit;
import org.eclipse.jgit.lib.CommitBuilder;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.lib.ObjectId;
@@ -401,12 +401,12 @@ public class CommitMsgHookTest extends HookTestCase {
private void setHEAD() throws Exception {
final ObjectInserter oi = repository.newObjectInserter();
try {
final Commit commit = new Commit(repository);
commit.setTreeId(DirCache.newInCore().writeTree(oi));
final CommitBuilder commit = new CommitBuilder();
commit.setTreeId(oi.insert(Constants.OBJ_TREE, new byte[] {}));
commit.setAuthor(author);
commit.setCommitter(committer);
commit.setMessage("test\n");
ObjectId commitId = oi.insert(Constants.OBJ_COMMIT, oi.format(commit));
ObjectId commitId = oi.insert(commit);
final RefUpdate ref = repository.updateRef(Constants.HEAD);
ref.setNewObjectId(commitId);