summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 905d9c9)
raw | patch | inline | side by side (parent: 905d9c9)
author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 1 Jun 2007 03:32:54 +0000 (23:32 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 1 Jun 2007 03:32:54 +0000 (23:32 -0400) |
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>
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>
git-gui.sh | patch | blob | history | |
lib/diff.tcl | patch | blob | history | |
lib/option.tcl | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index dba585111c111b180b9dc28ef67bda4be2fcb663..d6472636c366b52552c70d259f3288758591d6c0 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
$ctxm add separator
$ctxm add command \
-label {Show Less Context} \
- -command {if {$repo_config(gui.diffcontext) >= 2} {
+ -command {if {$repo_config(gui.diffcontext) >= 1} {
incr repo_config(gui.diffcontext) -1
reshow_diff
}}
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$ctxm add command \
-label {Show More Context} \
- -command {
+ -command {if {$repo_config(gui.diffcontext) < 99} {
incr repo_config(gui.diffcontext)
reshow_diff
- }
+ }}
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$ctxm add separator
$ctxm add command -label {Options...} \
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 7e715a6865858e35babf30e624c16314cdc2c2ec..29436b50cb351f88b1ebde20620729f210c37933 100644 (file)
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
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 17fcc65f78b5e09b77738508ca4db76d9a05a8f0..11dd9be6b95c2a1fd0155e49c45b5946aabf5f9e 100644 (file)
--- a/lib/option.tcl
+++ b/lib/option.tcl
{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]