1
0
mirror of https://github.com/git/git.git synced 2024-09-30 20:41:39 +02:00
Git Source Code Mirror. Please follow Documentation/SubmittingPatches procedure for any of your improvements.
Go to file
Shawn O. Pearce 19b41e4559 git-gui: Limit display of large untracked files.
Our internal diff viewer displays untracked files to help users see if
they should become tracked, or not.  It is not meant as a full file
viewer that handles any sort of input.  Consequently it is rather
unreasonable for users to expect us to show them very large files.
Some users may click on a very big file (and not know its very big)
then get surprised when Tk takes a long time to load the content and
render it, especially if their memory is tight and their OS starts to
swap processes out.

Instead we now limit the amount of data we load to the first 128 KiB
of any untracked file.  If the file is larger than 128 KiB we display
a warning message at the top of our diff viewer to notify the user
that we are not going to load the entire thing.  Users should be able
to recognize a file just by its first 128 KiB and determine if it
should be added to the repository or not.

Since we are loading 128 KiB we may as well scan it to see if the
file is binary.  So I've removed the "first 8000 bytes" rule and
just allowed git-gui to scan the entire data chunk that it read in.
This is probably faster anyway if Tcl's [string range] command winds
up making a copy of the data.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-01-23 02:33:58 -05:00
.gitignore git-gui: Ensure version number is always current. 2007-01-21 02:54:19 -05:00
git-gui.sh git-gui: Limit display of large untracked files. 2007-01-23 02:33:58 -05:00
GIT-VERSION-GEN git-gui: Ensure version number is always current. 2007-01-21 02:54:19 -05:00
Makefile git-gui: Ensure version number is always current. 2007-01-21 02:54:19 -05:00
TODO git-gui: Update todo list with finished and new items. 2007-01-21 22:47:59 -05:00