Skip to content
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

Document IndexEntry.path a bit #586

Merged
merged 1 commit into from Jul 7, 2020

Conversation

pkgw
Copy link
Contributor

@pkgw pkgw commented Jul 5, 2020

I've just started trying to use this library and had some questions about the semantics of the IndexEntry.path field. I've added a brief docstring to record my findings for posterity.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

There's some more detail in git's documentation: https://github.com/git/git/blob/a08a83db2bf27f015bec9a435f6d73e223c21c5e/Documentation/technical/index-format.txt#L107-L124

Interestingly, it looks like libgit2 decompresses the version 4 paths automatically.

@alexcrichton
Copy link
Member

@pkgw want to add a reference and/or extra bits from the docs @ehuss linked?

@pkgw
Copy link
Contributor Author

pkgw commented Jul 7, 2020

@alexcrichton Done, plus mentioning the existence of util::bytes2path if one wants to see how to turn these bytes into a path.

@alexcrichton alexcrichton merged commit 9f5cef6 into rust-lang:master Jul 7, 2020
@alexcrichton
Copy link
Member

👍

@pkgw pkgw deleted the index-path-docs branch July 9, 2020 16:31
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.

None yet

3 participants