[PATCH] Revert "git gui: show diffs with a minimum of 1 context line"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This reverts commit 55ba8a3474102eb8d638834d2b9bfe58d5014a40.

Conflicts:

	lib/option.tcl

Diffs without context can actually be useful. Depending on the changes
it can be less distracting to read them or to get an overview.

Signed-off-by: Markus Heidelberg <markus.heidelberg@xxxxxx>
---
 git-gui.sh     |    2 +-
 lib/diff.tcl   |    2 +-
 lib/option.tcl |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-gui.sh b/git-gui.sh
index 14b92ba..604fdad 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2287,7 +2287,7 @@ proc show_more_context {} {
 
 proc show_less_context {} {
 	global repo_config
-	if {$repo_config(gui.diffcontext) > 1} {
+	if {$repo_config(gui.diffcontext) >= 1} {
 		incr repo_config(gui.diffcontext) -1
 		reshow_diff
 	}
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 925b3f5..71b250b 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -282,7 +282,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
 
 	lappend cmd -p
 	lappend cmd --no-color
-	if {$repo_config(gui.diffcontext) >= 1} {
+	if {$repo_config(gui.diffcontext) >= 0} {
 		lappend cmd "-U$repo_config(gui.diffcontext)"
 	}
 	if {$w eq $ui_index} {
diff --git a/lib/option.tcl b/lib/option.tcl
index 1d55b49..eb216f6 100644
--- a/lib/option.tcl
+++ b/lib/option.tcl
@@ -149,7 +149,7 @@ proc do_options {} {
 		{b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}}
 		{i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
 		{i-0..300 gui.blamehistoryctx {mc "Blame History Context Radius (days)"}}
-		{i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
+		{i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
 		{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
 		{t gui.newbranchtemplate {mc "New Branch Name Template"}}
 		{c gui.encoding {mc "Default File Contents Encoding"}}
-- 
1.6.3.1.160.g45b30

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]