-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
add support for the git option "index.skipHash" #1488
base: master
Are you sure you want to change the base?
Conversation
…gg/support_skip_hash
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.
Shouldn't this be checking the configuration flag?
In libgit, they also don’t seem to check the configuration flig: https://github.com/libgit2/libgit2/pull/6738/files It seems to me that the checksum is all 0 in the index if the client used to write that index had |
# If git option index.skipHash is set the index will be empty | ||
if stored != self.sha1.digest() and ( | ||
not allow_empty | ||
or sha_to_hex(stored) != b"0000000000000000000000000000000000000000" |
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.
This should probably use the ZERO_SHA constant
They do set skipHash in the tests though: https://github.com/libgit2/libgit2/blob/913d4ea251366f006a5ced6ed1804acf973a6ce6/tests/resources/status_skiphash/.gitted/config#L8 |
Actually, I guess this is okay - but can you perhaps add support for skipHash on the creation side? We've been trying to remove the testdata files, so I'd rather not add any more. |
Here is the comparable implementation in another git library for adding support for the same feature: https://github.com/libgit2/libgit2/pull/6738/files