GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Preliminary support for index format v3 by blahgeek · Pull Request #2081 · gitpython-developers/GitPython

Conversation

@blahgeek

@blahgeek blahgeek commented Nov 2, 2025

Copy link
Copy Markdown
Contributor

#1960

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@blahgeek
Support index format v3
74ff8e5
Byron
Byron requested changes Nov 2, 2025
View reviewed changes

@Byron Byron left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/test_index.py Outdated
def test_index_version_v3(self, tmp_dir):
tmp_dir = Path(tmp_dir)
with cwd(tmp_dir):
subprocess.run(["git", "init", "-q"], check=True)

@Byron Byron Nov 2, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blahgeek blahgeek Nov 8, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

OK done

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/test_index.py Outdated

repo = Repo(tmp_dir)

assert len(repo.index.entries) == 1

@Byron Byron Nov 2, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blahgeek blahgeek Nov 8, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

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.

Done.

I don't see at all why it would use index version 3 here.

git add -N (--intent-to-add) would produce version 3 index. I added a comment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blahgeek blahgeek Nov 8, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

index.version

There's this minor thing that I'm not sure if it's an issue:

Currently, the version field of IndexFile is always set to 2 after __init__. Since it's lazy loaded, it's only after its first read of entries when its version field is set correctly. Do you think we can keep it this way?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@blahgeek

blahgeek commented Nov 8, 2025

Copy link
Copy Markdown
Contributor Author

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

OK. I've copied the file here and added a test case

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

github-advanced-security[bot]
github-advanced-security AI found potential problems Nov 8, 2025
View reviewed changes
Comment thread test/test_index.py Fixed

Uh oh!

There was an error while loading. Please reload this page.

@blahgeek
blahgeek force-pushed the support-index-v3 branch from cca4431 to acfee98 Compare November 8, 2025 06:04
@blahgeek
blahgeek requested a review from Byron November 8, 2025 06:08
@blahgeek
improve unit test
8a884fe
@blahgeek
blahgeek force-pushed the support-index-v3 branch from acfee98 to 8a884fe Compare November 8, 2025 06:14
Byron
Byron reviewed Nov 9, 2025
View reviewed changes
Comment thread test/test_index.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Byron
make linter happy
107b1b4
Byron
Byron approved these changes Nov 9, 2025
View reviewed changes

@Byron Byron left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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 adding the tests, it looks great now!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

blahgeek reacted with laugh emoji
All reactions
  • 😄 1 reaction
@Byron
Byron merged commit 564a043 into gitpython-developers:main Nov 9, 2025
27 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Byron Byron mentioned this pull request Jul 20, 2026
Git index version 3 support #1960
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Byron Byron Byron approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@blahgeek @Byron @github-advanced-security
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.