Repository navigation
Default GitFileSystem reads to HEAD - #2525
Open
Daniel-Kim-Grata wants to merge 1 commit into
Open
Daniel-Kim-Grata wants to merge 1 commit into
Daniel-Kim-Grata wants to merge 1 commit into
Conversation
N7766
reviewed
Nov 27, 2026
N7766
left a comment
There was a problem hiding this comment.
Additional check on e944670: a real linked worktree on feature/worktree, with .git as a file and uncommitted file edits. Default cat_file, fsspec.open(path=...), and an embedded git://repo:file URL all read the committed feature content; explicit ref="main" still reads main. Unpatched main fails the three default-ref cases. All 45 Git backend tests also pass (macOS/Python 3.11, pygit2 1.21.0). AI-assisted verification; other backends not tested.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Without an explicit ref, GitFileSystem resolves
mastereven when another branch is checked out. That fails in repositories withoutmasterand can read a different commit from the current checkout.Default to
HEADand clarify that the backend reads committed content rather than uncommitted working-tree edits. Explicit refs are unchanged.The new tests use real temporary repositories with a main branch but no master, and a detached HEAD that differs from master. Both fail before the change. All 45 Git filesystem tests pass after it.