提交 f2df8a5b 编写于 作者: J Johannes Sixt 提交者: Shawn O. Pearce

git-gui: Show a round number of bytes of large untracked text files

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: NJohannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
上级 5c91cb5d
......@@ -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]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册