summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-06-01 03:32:54 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-06-01 03:32:54 (GMT)
commitb8848f7753762ff8c4e34b3c15e788c5f7e6781f (patch)
tree3eebe3b6357b574c9d2c7d69b260d37f2cf93dde /lib
parent905d9c9653a7dc324a1c6fbf883a1b9bcdc6e5bf (diff)
downloadgit-b8848f7753762ff8c4e34b3c15e788c5f7e6781f.zip
git-b8848f7753762ff8c4e34b3c15e788c5f7e6781f.tar.gz
git-b8848f7753762ff8c4e34b3c15e788c5f7e6781f.tar.bz2
git-gui: Allow as few as 0 lines of diff context
Johannes Sixt pointed out that dropping to 0 lines of context does allow the user to get more fine-grained hunk selection, especially since we don't currently support "highlight and apply (or revert)". Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/diff.tcl2
-rw-r--r--lib/option.tcl2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 7e715a6..29436b5 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -145,7 +145,7 @@ proc show_diff {path w {lno {}}} {
lappend cmd -p
lappend cmd --no-color
- if {$repo_config(gui.diffcontext) > 0} {
+ 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 17fcc65..11dd9be 100644
--- a/lib/option.tcl
+++ b/lib/option.tcl
@@ -173,7 +173,7 @@ proc do_options {} {
{i-1..5 merge.verbosity {Merge Verbosity}}
{b gui.trustmtime {Trust File Modification Timestamps}}
- {i-1..99 gui.diffcontext {Number of Diff Context Lines}}
+ {i-0..99 gui.diffcontext {Number of Diff Context Lines}}
{t gui.newbranchtemplate {New Branch Name Template}}
} {
set type [lindex $option 0]