{"thread":{"id":"19452","subject":"[PATCH] Revert \"git gui: show diffs with a minimum of 1 context line\"","startedAt":"2009-05-23T17:28:47Z","lastAt":"2009-05-24T10:01:03Z","messageCount":3,"participants":["Markus Heidelberg","Clemens Buchacher"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"114517","messageId":"1243099727-5272-1-git-send-email-markus.heidelberg@web.de","threadId":"19452","inReplyTo":null,"subject":"[PATCH] Revert \"git gui: show diffs with a minimum of 1 context line\"","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-05-23T17:28:47Z","receivedAt":"2009-05-23T17:28:47Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"This reverts commit 55ba8a3474102eb8d638834d2b9bfe58d5014a40.\n\nConflicts:\n\n\tlib/option.tcl\n\nDiffs without context can actually be useful. Depending on the changes\nit can be less distracting to read them or to get an overview.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n git-gui.sh     |    2 +-\n lib/diff.tcl   |    2 +-\n lib/option.tcl |    2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 14b92ba..604fdad 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -2287,7 +2287,7 @@ proc show_more_context {} {\n \n proc show_less_context {} {\n \tglobal repo_config\n-\tif {$repo_config(gui.diffcontext) > 1} {\n+\tif {$repo_config(gui.diffcontext) >= 1} {\n \t\tincr repo_config(gui.diffcontext) -1\n \t\treshow_diff\n \t}\ndiff --git a/lib/diff.tcl b/lib/diff.tcl\nindex 925b3f5..71b250b 100644\n--- a/lib/diff.tcl\n+++ b/lib/diff.tcl\n@@ -282,7 +282,7 @@ proc start_show_diff {cont_info {add_opts {}}} {\n \n \tlappend cmd -p\n \tlappend cmd --no-color\n-\tif {$repo_config(gui.diffcontext) >= 1} {\n+\tif {$repo_config(gui.diffcontext) >= 0} {\n \t\tlappend cmd \"-U$repo_config(gui.diffcontext)\"\n \t}\n \tif {$w eq $ui_index} {\ndiff --git a/lib/option.tcl b/lib/option.tcl\nindex 1d55b49..eb216f6 100644\n--- a/lib/option.tcl\n+++ b/lib/option.tcl\n@@ -149,7 +149,7 @@ proc do_options {} {\n \t\t{b gui.fastcopyblame {mc \"Blame Copy Only On Changed Files\"}}\n \t\t{i-20..200 gui.copyblamethreshold {mc \"Minimum Letters To Blame Copy On\"}}\n \t\t{i-0..300 gui.blamehistoryctx {mc \"Blame History Context Radius (days)\"}}\n-\t\t{i-1..99 gui.diffcontext {mc \"Number of Diff Context Lines\"}}\n+\t\t{i-0..99 gui.diffcontext {mc \"Number of Diff Context Lines\"}}\n \t\t{i-0..99 gui.commitmsgwidth {mc \"Commit Message Text Width\"}}\n \t\t{t gui.newbranchtemplate {mc \"New Branch Name Template\"}}\n \t\t{c gui.encoding {mc \"Default File Contents Encoding\"}}\n-- \n1.6.3.1.160.g45b30\n"},{"id":"114540","messageId":"20090523231605.GA4522@localhost","threadId":"19452","inReplyTo":"1243099727-5272-1-git-send-email-markus.heidelberg@web.de","subject":"Re: [PATCH] Revert \"git gui: show diffs with a minimum of 1 context line\"","fromName":"Clemens Buchacher","fromEmail":"drizzd@aon.at","sentAt":"2009-05-23T23:16:06Z","receivedAt":"2009-05-23T23:16:06Z","isPatch":true,"sender":{"key":"drizzd@gmx.net","avatar":"https://avatars.githubusercontent.com/u/59082?v=4"},"body":"On Sat, May 23, 2009 at 07:28:47PM +0200, Markus Heidelberg wrote:\n> Diffs without context can actually be useful. Depending on the changes\n> it can be less distracting to read them or to get an overview.\n\nMaybe so. But as stated in the commit message of 55ba8a3 (git gui: show\ndiffs with a minimum of 1 context line) context-less diff was disabled\nbecause it caused bugs with staging. However, I never got around to fix the\nreal cause of the problem. See the original thread at\n\nhttp://article.gmane.org/gmane.comp.version-control.git/94387\n"},{"id":"114553","messageId":"200905241201.04297.markus.heidelberg@web.de","threadId":"19452","inReplyTo":"20090523231605.GA4522@localhost","subject":"Re: [PATCH] Revert \"git gui: show diffs with a minimum of 1 context line\"","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-05-24T10:01:03Z","receivedAt":"2009-05-24T10:01:03Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Clemens Buchacher, 24.05.2009:\n> On Sat, May 23, 2009 at 07:28:47PM +0200, Markus Heidelberg wrote:\n> > Diffs without context can actually be useful. Depending on the changes\n> > it can be less distracting to read them or to get an overview.\n> \n> Maybe so. But as stated in the commit message of 55ba8a3 (git gui: show\n> diffs with a minimum of 1 context line) context-less diff was disabled\n> because it caused bugs with staging.\n\nIt wasn't clear to me that there were bugs. I thought it just \"does not\nwork\" in some way, but should have tried it at least. Now I see.\n\n> However, I never got around to fix the\n> real cause of the problem. See the original thread at\n> \n> http://article.gmane.org/gmane.comp.version-control.git/94387\n\nThanks for the link. After reading this discussion I also see that\ndisabling staging with zero context is not a user-friendly solution.\n\nMarkus\n"}]}