summaryrefslogtreecommitdiff
path: root/git-gui.sh
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 /git-gui.sh
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 'git-gui.sh')
-rwxr-xr-xgit-gui.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-gui.sh b/git-gui.sh
index dba5851..d647263 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2038,17 +2038,17 @@ lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
$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...} \