Skip to content

Fix 'path cannot exist in repository' during diff for in-memory repository #6683

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

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

kcsaul
Copy link
Contributor

@kcsaul kcsaul commented Dec 14, 2023

Fixes obscure bug caused by change shown below in 54a22f5.

image

For an in-memory repository without an index setup, nor any directory on-disk, git_repository_index_weakptr can now fail with a not found error returned by repository_index_path, as a consequence of this, attr_setup returns the not found error in this scenario, which then results in an error when attempting to lookup the driver for comparing a file during a diff.

Elsewhere, the not found errors are ignored within attr_setup directly, or indirectly by callers of that, but error is escaping via the diff driver lookup, hence fix added to ignore it directly within attr_setup.

@kcsaul kcsaul force-pushed the ignore_missing_index branch from c086ff3 to f579305 Compare December 14, 2023 23:07
@ethomson
Copy link
Member

Looks good - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants