Skip to content

Commit

Permalink
git-gui: Show a round number of bytes of large untracked text files
Browse files Browse the repository at this point in the history
If an untracked text file is selected, then its contents are displayed
instead of a diff. If the file is large, then the following hint is
inserted at the top:

  * Untracked file is 14774881 bytes.
  * Showing only first 131072 bytes.

Why exactly 131072 bytes? With this patch it is 100000 bytes.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Johannes Sixt authored and Shawn O. Pearce committed Oct 10, 2008
1 parent 5c91cb5 commit f2df8a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/diff.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ proc show_other_diff {path w m cont_info} {
# - Git won't give us the diff, there's nothing to compare to!
#
if {$m eq {_O}} {
set max_sz [expr {128 * 1024}]
set max_sz 100000
set type unknown
if {[catch {
set type [file type $path]
Expand Down

0 comments on commit f2df8a5

Please sign in to comment.