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

Fixes for a standalone index #372

Merged
merged 3 commits into from
May 28, 2014
Merged

Conversation

carlosmn
Copy link
Member

An Index can exist on its own, so we need to make sure it works even without an associated repository. read_tree() would segfault for an index which was created through its constructor. In those cases, we need the object directly, as we don't know where to look it up.

carlosmn added 3 commits May 27, 2014 18:51
The index can exist purely as a data structure. Let's test that so we
make sure we support that.
There is no obligation for an index to exist as a file at all.
An index may not have an associated repository, so giving it an id in
that case is useless. Raise an error in that case and accept a Tree
object to make the function useful then.
@jdavid jdavid merged commit 9e91a39 into libgit2:master May 28, 2014
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