Merge branch 'maint'
authorShawn O. Pearce <spearce@spearce.org>
Mon, 1 Sep 2008 22:39:56 +0000 (15:39 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 1 Sep 2008 22:39:56 +0000 (15:39 -0700)
* maint:
git-gui: Fix string escaping in po2msg.sh
git gui: show diffs with a minimum of 1 context line

Conflicts:
lib/option.tcl

git-gui.sh
lib/diff.tcl
lib/option.tcl
po/po2msg.sh
index ec08b5a921ed8ebc17714b5f2e96682b68d0d6bd..99de1a2571c4cee83436c8b2705e3abc45ae5c67 100755 (executable)
@@ -1947,7 +1947,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
        }
index 52b79e4a1f476c2ee9b65087f66a352a25ed0903..4a7138be9c0a860d7b4a9820a6d796fa3cabc700 100644 (file)
@@ -175,7 +175,7 @@ proc show_diff {path w {lno {}} {scroll_pos {}}} {
 
        lappend cmd -p
        lappend cmd --no-color
-       if {$repo_config(gui.diffcontext) >= 0} {
+       if {$repo_config(gui.diffcontext) >= 1} {
                lappend cmd "-U$repo_config(gui.diffcontext)"
        }
        if {$w eq $ui_index} {
index eb958ffd47bf6b4be5b61a45191079dff99331a2..2d4b97b7d3fb90d8c6575b4d4e645d52104b89c1 100644 (file)
@@ -126,7 +126,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-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
+               {i-1..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"}}
                } {
index b7c4bf3fdffb3d04b8c01b25e99a706e499de0d1..1e9f992528153fa62c167db8f8e8c184e7df86bd 100644 (file)
@@ -11,8 +11,8 @@ proc u2a {s} {
        foreach i [split $s ""] {
                scan $i %c c
                if {$c<128} {
-                       # escape '[', '\' and ']'
-                       if {$c == 0x5b || $c == 0x5d} {
+                       # escape '[', '\', '$' and ']'
+                       if {$c == 0x5b || $c == 0x5d || $c == 0x24} {
                                append res "\\"
                        }
                        append res $i