Closed k----n closed 3 years ago
Only text blobs are currently stored. What is "text" is defined by git.
A small fraction of text blobs may be missing, due to processing pipline (as with commits)
Thanks.
Is "text" the files where the line changes can be determined?
It seems like git either treats a file as text or binary? https://stackoverflow.com/questions/6855712/why-does-git-treat-this-text-file-as-a-binary-file
Is there a better way to determine the type of blob instead of changing the file and running git diff
?
in a fork of libgit2 I have created classify command that determines the type of object: but you need an original git repo to use it. libgit2 probably has the actual algorithm (that probably relies on file name and content) to determine git definition of "binary"
Neat, looks like it's a function in the libgit2 library: https://libgit2.org/libgit2/#HEAD/group/blob/git_blob_is_binary
And was called in places like:
For example:
echo 0001f9fcc01ec8019657cfbc249e1a99f087908a | showCnt blob
was run with the output:There is a
b2c
mapping:The commit
d1f2d24001d1e42a0f926e4f8555015caba07848
links to these 2 commits: