Skip to content

Conversation

@blahgeek
Copy link

@blahgeek blahgeek commented Nov 2, 2025

Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks a lot for tackling this!

I think it would be useful to add a small test-index directly, one that is known to be V3. The Gitoxide repository definitely has them: https://github.com/GitoxideLabs/gitoxide/blob/ecd354119c3a8b150a06df7205ddf022a825d6cd/gix-index/tests/fixtures/loose_index/extended-flags.git-index

Thanks again.

def test_index_version_v3(self, tmp_dir):
tmp_dir = Path(tmp_dir)
with cwd(tmp_dir):
subprocess.run(["git", "init", "-q"], check=True)
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to use the Git type instead? That way one would benefit from all the 'extras', especially around finding the right Git binary.


repo = Repo(tmp_dir)

assert len(repo.index.entries) == 1
Copy link
Member

Choose a reason for hiding this comment

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

To test this, I think the index.version must be exposed and validated here.
I don't see at all why it would use index version 3 here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants