On 6/9/2018 12:43 PM, Duy Nguyen wrote:
On Thu, Jun 7, 2018 at 7:01 PM Derrick Stolee <stolee@xxxxxxxxx> wrote:
Signed-off-by: Derrick Stolee <dstolee@xxxxxxxxxxxxx>
---
Documentation/technical/pack-format.txt | 5 +++
builtin/midx.c | 7 ++++
midx.c | 56 +++++++++++++++++++++++--
object-store.h | 2 +
t/t5319-midx.sh | 11 +++--
5 files changed, 75 insertions(+), 6 deletions(-)
diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index 2b37be7b33..29bf87283a 100644
--- a/Documentation/technical/pack-format.txt
+++ b/Documentation/technical/pack-format.txt
@@ -296,6 +296,11 @@ CHUNK LOOKUP:
CHUNK DATA:
+ Packfile Name Lookup (ID: {'P', 'L', 'O', 'O'}) (P * 4 bytes)
+ P * 4 bytes storing the offset in the packfile name chunk for
+ the null-terminated string containing the filename for the
+ ith packfile.
+
Commit message is too light on this one. Why does this need to be
stored? Isn't the cost of rebuilding this in-core cheap?
Adding this chunk on disk in my opinion only adds more burden. Now you
have to verify that these offsets actually point to the right place.
This is a very good point. I'll drop the chunk and just read the names
directly to construct the array of strings.
Thanks,
-Stolee