Support index v4 by novalis · Pull Request #3837 · libgit2/libgit2 · GitHub
Skip to content

Support index v4#3837

Merged
ethomson merged 2 commits into
libgit2:masterfrom
novalis:dturner/indexv4
Aug 17, 2016
Merged

Support index v4#3837
ethomson merged 2 commits into
libgit2:masterfrom
novalis:dturner/indexv4

Conversation

@novalis

@novalis novalis commented Jun 25, 2016

Copy link
Copy Markdown
Contributor

moved from #3789 because I no longer have access to the twitter github account.

This version leaves one in/out parameter, but I think otherwise addresses the concerns in the prev request.

Comment thread src/varint.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion it would be a cleaner interface design if we have the caller pass in the buffer's maximum length so we do not overflow it. Otherwise it's somewhat magical to the caller how big the buffer is required to be.

Comment thread include/git2/index.h Outdated
* Set index on-disk version.
*
* Valid values are 2, 3, or 4. If 2 is given, an index with version
* 3 may be written instead, if necessary to accurately represent the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mention this is the version that a git_index_write() will use to write to disk. The part about 2 vs 3 reads as though this would write out the index.

@novalis

novalis commented Jul 22, 2016

Copy link
Copy Markdown
Contributor Author

Pretty sure these test failures are spurious and that this patch is ready to go.

@pks-t

pks-t commented Aug 4, 2016

Copy link
Copy Markdown
Member

I've restarted these jobs. But you'll need to rebase the branch upon current master, as your changes now create conflicts.

@novalis novalis force-pushed the dturner/indexv4 branch 2 times, most recently from db7e813 to de985bc Compare August 4, 2016 15:10
@novalis

novalis commented Aug 4, 2016

Copy link
Copy Markdown
Contributor Author

Conflicts fixed, tests pass.

This code is ported from git.git

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Support reading and writing index v4.  Index v4 uses a very simple
compression scheme for pathnames, but is otherwise similar to index v3.

Signed-off-by: David Turner <dturner@twitter.com>
@novalis

novalis commented Aug 10, 2016

Copy link
Copy Markdown
Contributor Author

@pks-t I keep having to rebase to deal with ChangeLog conflicts. All of the substantive issues raised in review have been solved. CI passes. Can you (or someone else) please merge this?

@pks-t

pks-t commented Aug 11, 2016

Copy link
Copy Markdown
Member

I don't have enough knowledge on the index format code, so I can't really comment on or merge this PR despite stylistic issues.

@novalis

novalis commented Aug 16, 2016

Copy link
Copy Markdown
Contributor Author

@ethomson can you merge this?

@ethomson

Copy link
Copy Markdown
Member

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.

5 participants