Commit 0b6d037
committed
MidxPackList: getAllPlainPacks returns object-lookup order
For object lookup we want the most recent packs first, because we
usually talk more about recent object. In midx, we want oldest packs
first to choose the oldest copy of an object for duplicates.
MidxPackList replaces a midx in the pack list with its covered packs,
but it keep them in midx order, producing a list that is in no useful
order. e.g. [INSERT, midx(GC, COMPACT)] returns [INSERT, GC, COMPACT].
Introduced the covered packs in reverse order, so the list matches the
object lookup order. Then [INSERT, midx(GC, COMPACT)] becomes [INSERT,
COMPACT, GC].
Link: https://review.gerrithub.io/id/I96458e5585b00d31ae6f1085412a2f5b6a6a69641 parent a16b144 commit 0b6d037
File tree
2 files changed
+15
-6
lines changed- org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs
- org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs
2 files changed
+15
-6
lines changedLines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
66 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
0 commit comments