author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 23 Jan 2007 07:08:09 +0000 (02:08 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 23 Jan 2007 07:08:09 +0000 (02:08 -0500) | ||
commit | 464c9ffee45520c8be3ec656f926224501bcf977 | |
tree | f58a8b210725fcb6bf2d3a520094658a1792b26f | tree | snapshot |
parent | 124355d32c0612192e729e12f1d3d68849754f29 | commit | diff |
git-gui: Don't show content of untracked binary files.
A binary file can be very large, and showing the complete content of
one is horribly ugly and confusing. So we now use the same rule that
core Git uses; if there is a NUL byte (\0) within the first 8000 bytes
of the file we assume it is binary and refuse to show the content.
Given that we have loaded the entire content of the file into memory
we probably could just afford to search the whole thing, but we also
probably should not load multi-megabyte binary files either.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
A binary file can be very large, and showing the complete content of
one is horribly ugly and confusing. So we now use the same rule that
core Git uses; if there is a NUL byte (\0) within the first 8000 bytes
of the file we assume it is binary and refuse to show the content.
Given that we have loaded the entire content of the file into memory
we probably could just afford to search the whole thing, but we also
probably should not load multi-megabyte binary files either.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |