Commit 86ae4bd
committed
DfsPackFileMidx: Pass the right pack when building single-pack midx
While instantiating a single-pack midx, the code assumes that the
incoming list of known packs has only the packs mentioned in the
description and takes blindly the first pack in the list. This can
pick the wrong pack because that list contains all known packs in the
repo in no specific order.
This was found out while making MidxTestUtils work with midx as input
to build another midx. It needs to take plain packs instead of
whatever was given to the midx and that new list doesn't necessarily
have the expected pack first.
Lookup the pack by pack name before passing it to the
DfsPackFileSinglePack instance.
Change-Id: I144f15dcaa860367093a141f29152dce6a6a69641 parent db7dcf9 commit 86ae4bd
File tree
2 files changed
+11
-2
lines changed- org.eclipse.jgit.test/src/org/eclipse/jgit/internal/storage/dfs
- org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs
2 files changed
+11
-2
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
153 | 157 | | |
154 | | - | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
0 commit comments