midx: Introduce a parser for multi-pack-index files by lhchavez · Pull Request #5401 · libgit2/libgit2 · GitHub
Skip to content

midx: Introduce a parser for multi-pack-index files#5401

Merged
ethomson merged 1 commit into
libgit2:masterfrom
lhchavez:multi-pack-index
Oct 5, 2020
Merged

midx: Introduce a parser for multi-pack-index files#5401
ethomson merged 1 commit into
libgit2:masterfrom
lhchavez:multi-pack-index

Conversation

@lhchavez

Copy link
Copy Markdown
Contributor

This change is the first in a series to add support for git's
multi-pack-index. This should speed up large repositories significantly.

Part of: #5399

Comment thread src/multipack.h Outdated
@lhchavez lhchavez force-pushed the multi-pack-index branch 9 times, most recently from 9b99abe to 22fedd3 Compare February 17, 2020 04:16
@lhchavez lhchavez force-pushed the multi-pack-index branch 2 times, most recently from f47ec5e to 35e7640 Compare February 23, 2020 23:00
@ethomson

Copy link
Copy Markdown
Member

@lhchavez

Copy link
Copy Markdown
Contributor Author

Instead of strictly reverting the sha1_lookup change, let's leave it in pack.c, that way we don't have two additional files in the tree for a single function. We can provide it internally for the library and name it git_pack__lookup_sha1 or something.

good point! done! (also took the opportunity to add a comment to the function and rename the arguments).

@ethomson

ethomson commented Oct 4, 2020

Copy link
Copy Markdown
Member

Sorry about the delay here. Let's move forward with this. Would you mind rebasing this on master so that we can get an up-to-date CI pass?

@lhchavez

lhchavez commented Oct 4, 2020

Copy link
Copy Markdown
Contributor Author

Sorry about the delay here. Let's move forward with this. Would you mind rebasing this on master so that we can get an up-to-date CI pass?

Done!

@ethomson

ethomson commented Oct 5, 2020

Copy link
Copy Markdown
Member

One thought that I have is that maybe this should be called git_midx instead of git_multipack_index. a) midx is significantly shorter 😀 but b) the multipack index is the atomic unit here, if I understand correctly. git_multipack_index makes it sound like there's an index on an atomic unit called a git_multipack. But there is not.

Since this is an internal-only type, I don't necessarily think that it's a hard and fast requirement to make this change, but I think that the update would be an improvement. What do you think @lhchavez?

This change is the first in a series to add support for git's
multi-pack-index. This should speed up large repositories significantly.

Part of: libgit2#5399
@lhchavez

lhchavez commented Oct 5, 2020

Copy link
Copy Markdown
Contributor Author

One thought that I have is that maybe this should be called git_midx instead of git_multipack_index. a) midx is significantly shorter but b) the multipack index is the atomic unit here, if I understand correctly. git_multipack_index makes it sound like there's an index on an atomic unit called a git_multipack. But there is not.

Since this is an internal-only type, I don't necessarily think that it's a hard and fast requirement to make this change, but I think that the update would be an improvement. What do you think @lhchavez?

sounds reasonable. Done!

@ethomson

ethomson commented Oct 5, 2020

Copy link
Copy Markdown
Member

@lhchavez lhchavez changed the title multipack: Introduce a parser for multi-pack-index files midx: Introduce a parser for multi-pack-index files Oct 5, 2020
@ethomson ethomson merged commit d32a407 into libgit2:master Oct 5, 2020
@lhchavez lhchavez deleted the multi-pack-index branch October 5, 2020 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants