Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support index v4 #3837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2016
Merged

Support index v4 #3837

merged 2 commits into from
Aug 17, 2016

Conversation

novalis
Copy link
Contributor

@novalis novalis commented Jun 25, 2016

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.

return val;
}

int git_encode_varint(unsigned char *buf, uintmax_t value)
Copy link
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.

*
* 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
* index.
Copy link
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
Copy link
Contributor Author

novalis commented Jul 22, 2016

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

@pks-t
Copy link
Member

pks-t commented Aug 4, 2016

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
Copy link
Contributor Author

novalis commented Aug 4, 2016

Conflicts fixed, tests pass.

This code is ported from git.git

Signed-off-by: Junio C Hamano <[email protected]>
Signed-off-by: David Turner <[email protected]>
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 <[email protected]>
@novalis
Copy link
Contributor Author

novalis commented Aug 10, 2016

@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
Copy link
Member

pks-t commented Aug 11, 2016

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
Copy link
Contributor Author

novalis commented Aug 16, 2016

@ethomson can you merge this?

@ethomson
Copy link
Member

@novalis Sure - thanks for hacking on this!

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