From: Shawn O. Pearce Date: Mon, 1 Sep 2008 22:39:56 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.6.1-rc1~270^2~10 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/961a628fdd79a30188b0f76be98b3c1db8e13389?ds=inline;hp=-c Merge branch 'maint' * maint: git-gui: Fix string escaping in po2msg.sh git gui: show diffs with a minimum of 1 context line Conflicts: lib/option.tcl --- 961a628fdd79a30188b0f76be98b3c1db8e13389 diff --combined git-gui.sh index ec08b5a921,86402d49f7..99de1a2571 --- a/git-gui.sh +++ b/git-gui.sh @@@ -668,7 -668,6 +668,7 @@@ set default_config(gui.pruneduringfetch set default_config(gui.trustmtime) false set default_config(gui.fastcopyblame) false set default_config(gui.copyblamethreshold) 40 +set default_config(gui.blamehistoryctx) 7 set default_config(gui.diffcontext) 5 set default_config(gui.commitmsgwidth) 75 set default_config(gui.newbranchtemplate) {} @@@ -1620,15 -1619,6 +1620,15 @@@ static unsigned char file_merge_bits[] 0xfa, 0x17, 0x02, 0x10, 0xfe, 0x1f}; } -maskdata $filemask +image create bitmap file_statechange -background white -foreground green -data { +#define file_merge_width 14 +#define file_merge_height 15 +static unsigned char file_statechange_bits[] = { + 0xfe, 0x01, 0x02, 0x03, 0x02, 0x05, 0x02, 0x09, 0x02, 0x1f, 0x62, 0x10, + 0x62, 0x10, 0xba, 0x11, 0xba, 0x11, 0x62, 0x10, 0x62, 0x10, 0x02, 0x10, + 0x02, 0x10, 0x02, 0x10, 0xfe, 0x1f}; +} -maskdata $filemask + set ui_index .vpane.files.index.list set ui_workdir .vpane.files.workdir.list @@@ -1637,14 -1627,12 +1637,14 @@@ set all_icons(A$ui_index) file_fullti set all_icons(M$ui_index) file_fulltick set all_icons(D$ui_index) file_removed set all_icons(U$ui_index) file_merge +set all_icons(T$ui_index) file_statechange set all_icons(_$ui_workdir) file_plain set all_icons(M$ui_workdir) file_mod set all_icons(D$ui_workdir) file_question set all_icons(U$ui_workdir) file_merge set all_icons(O$ui_workdir) file_plain +set all_icons(T$ui_workdir) file_statechange set max_status_desc 0 foreach i { @@@ -1655,9 -1643,6 +1655,9 @@@ {MM {mc "Portions staged for commit"}} {MD {mc "Staged for commit, missing"}} + {_T {mc "File type changed, not staged"}} + {T_ {mc "File type changed, staged"}} + {_O {mc "Untracked, not staged"}} {A_ {mc "Staged for commit"}} {AM {mc "Portions staged for commit"}} @@@ -1947,7 -1932,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 } @@@ -2296,15 -2281,10 +2296,15 @@@ proc usage {} switch -- $subcommand { browser - blame { - set subcommand_args {rev? path} + if {$subcommand eq "blame"} { + set subcommand_args {[--line=] rev? path} + } else { + set subcommand_args {rev? path} + } if {$argv eq {}} usage set head {} set path {} + set jump_spec {} set is_path 0 foreach a $argv { if {$is_path || [file exists $_prefix$a]} { @@@ -2318,9 -2298,6 +2318,9 @@@ set path {} } set is_path 1 + } elseif {[regexp {^--line=(\d+)$} $a a lnum]} { + if {$jump_spec ne {} || $head ne {}} usage + set jump_spec [list $lnum] } elseif {$head eq {}} { if {$head ne {}} usage set head $a @@@ -2352,7 -2329,6 +2352,7 @@@ switch -- $subcommand { browser { + if {$jump_spec ne {}} usage if {$head eq {}} { if {$path ne {} && [file isdirectory $path]} { set head $current_branch @@@ -2368,7 -2344,7 +2368,7 @@@ puts stderr [mc "fatal: cannot stat path %s: No such file or directory" $path] exit 1 } - blame::new $head $path + blame::new $head $path $jump_spec } } return @@@ -2781,9 -2757,7 +2781,9 @@@ proc popup_diff_menu {ctxm x y X Y} if {$::is_3way_diff || $current_diff_path eq {} || ![info exists file_states($current_diff_path)] - || {_O} eq [lindex $file_states($current_diff_path) 0]} { + || {_O} eq [lindex $file_states($current_diff_path) 0] + || {_T} eq [lindex $file_states($current_diff_path) 0] + || {T_} eq [lindex $file_states($current_diff_path) 0]} { set s disabled } else { set s normal diff --combined lib/option.tcl index eb958ffd47,5e1346e601..2d4b97b7d3 --- a/lib/option.tcl +++ b/lib/option.tcl @@@ -125,8 -125,7 +125,8 @@@ proc do_options {} {b gui.matchtrackingbranch {mc "Match Tracking Branches"}} {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"}} } {