{"thread":{"id":"15767","subject":"[PATCH] git-gui: Show a round number of bytes of large untracked text files","startedAt":"2008-10-03T08:28:49Z","lastAt":"2008-10-03T08:28:49Z","messageCount":1,"participants":["Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"92228","messageId":"48E5D7C1.7050404@viscovery.net","threadId":"15767","inReplyTo":null,"subject":"[PATCH] git-gui: Show a round number of bytes of large untracked text files","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-10-03T08:28:49Z","receivedAt":"2008-10-03T08:28:49Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Sixt <johannes.sixt@telecom.at>\n\nIf an untracked text file is selected, then its contents are displayed\ninstead of a diff. If the file is large, then the following hint is\ninserted at the top:\n\n  * Untracked file is 14774881 bytes.\n  * Showing only first 131072 bytes.\n\nWhy exactly 131072 bytes? With this patch it is 100000 bytes.\n\nSigned-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n Another bikeshed to paint. ;)\n\n Every now and then I stumble over this number, and I ask myself,\n why are those h4x3rs so binary?\n\n -- Hannes\n\n lib/diff.tcl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/lib/diff.tcl b/lib/diff.tcl\nindex abe502d..6e08704 100644\n--- a/lib/diff.tcl\n+++ b/lib/diff.tcl\n@@ -164,7 +164,7 @@ proc show_other_diff {path w m cont_info} {\n \t# - Git won't give us the diff, there's nothing to compare to!\n \t#\n \tif {$m eq {_O}} {\n-\t\tset max_sz [expr {128 * 1024}]\n+\t\tset max_sz 100000\n \t\tset type unknown\n \t\tif {[catch {\n \t\t\t\tset type [file type $path]\n-- \n1.6.0.2.319.gffa7c\n"}]}