assertEquals(A.getId(), all.get("refs/heads/master").getObjectId());
assertEquals(Storage.PACKED, all.get("refs/heads/other").getStorage());
assertEquals(Storage.PACKED, all.get("refs/tags/v1.0").getStorage());
repo.update("refs/heads/master", B.getId());
RevTag v0_1 = repo.tag("v0.1", A);
repo.update("refs/tags/v0.1", v0_1);
all = refdir.getRefs(RefDatabase.ALL);
assertEquals(5, all.size());
assertEquals(Storage.LOOSE, all.get(HEAD).getStorage());
// Why isn't the next ref LOOSE_PACKED?
assertEquals(Storage.LOOSE, all.get("refs/heads/master")
.getStorage());
assertEquals(B.getId(), all.get("refs/heads/master").getObjectId());
assertEquals(Storage.PACKED, all.get("refs/heads/other").getStorage());
assertEquals(Storage.PACKED, all.get("refs/tags/v1.0").getStorage());
assertEquals(Storage.LOOSE, all.get("refs/tags/v0.1").getStorage());
assertEquals(v0_1.getId(), all.get("refs/tags/v0.1").getObjectId());
all = refdir.getRefs(RefDatabase.ALL);
refdir.pack(new ArrayList<String>(all.keySet()));
all = refdir.getRefs(RefDatabase.ALL);
assertEquals(5, all.size());
assertEquals(Storage.LOOSE, all.get(HEAD).getStorage());
// Why isn't the next ref LOOSE_PACKED?
assertEquals(Storage.PACKED, all.get("refs/heads/master").getStorage());
assertEquals(B.getId(), all.get("refs/heads/master").getObjectId());
assertEquals(Storage.PACKED, all.get("refs/heads/other").getStorage());
assertEquals(Storage.PACKED, all.get("refs/tags/v1.0").getStorage());
assertEquals(Storage.PACKED, all.get("refs/tags/v0.1").getStorage());
assertEquals(v0_1.getId(), all.get("refs/tags/v0.1").getObjectId());
}