DORMANTno replies

[JGIT PATCH] Fix sorting of thin packs in PackWriter

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:46:23
Subsystem: the rest · Maintainer: Linus Torvalds

We must retain the TOPO and COMMIT_TIME_DESC rules when we add in
BOUNDARY for a thin pack, otherwise the resulting thin pack won't
match the expected ordering.

Its a non-critical error to sort the pack wrong, but it may cause the
client to skip around the pack data more frequently during access.

Signed-off-by: Shawn O. Pearce <redacted>
---
 .../src/org/spearce/jgit/lib/PackWriter.java       |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java
index f9945c4..b878409 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java
@@ -765,10 +765,10 @@ private ObjectWalk setUpWalker(
 			throws MissingObjectException, IOException,
 			IncorrectObjectTypeException {
 		final ObjectWalk walker = new ObjectWalk(db);
-		walker.sort(RevSort.TOPO, true);
+		walker.sort(RevSort.TOPO);
 		walker.sort(RevSort.COMMIT_TIME_DESC, true);
 		if (thin)
-			walker.sort(RevSort.BOUNDARY);
+			walker.sort(RevSort.BOUNDARY, true);
 
 		for (ObjectId id : interestingObjects) {
 			RevObject o = walker.parseAny(id);
-- 
1.6.2.288.gc3f22
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help