I believe Git does not do any particular handling on how it *stores *binary 
files. A blob is a blob, whether it's text or binary.

However, there are some differences when handling binary files:

   - Git avoids doing any 
end-of-line-conversion<https://help.github.com/articles/dealing-with-line-endings>on
 files it considers to be binary during add and commit
   - When comparing versions, the actual diff is not printed for binary 
   files, but the change in size of the file (unless you specify --binary)
   - Git does not attempt to auto-merge contents of binary files during 
   conflicts

Since the "decision" of whether Git will consider a file binary is made 
during these actions, you have to exercise one of them to get the answer. 
I'd say the easiest one is to add the file to the index (git add filename), 
and then do a git diff --cached

If the file is already in the repository, do git log -p filename to see 
what kind of diff is printed.

On Monday, June 25, 2012 10:11:31 PM UTC+2, jjm wrote:
>
> In the documentation for the *text* attribute, it says "If git decides 
> that the content is text...".
>
> Is there a way, for any given file in the working area and/or index and/or 
> repository, to find out what Git's decision is: whether the content of the 
> file is text or binary?
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/k-m9TscXN1QJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to