diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-09-03 23:07:59 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-09-03 23:07:59 -0400 |
commit | 4b08aa3fef4258bf27f1bfa11fb9c0a8315c61aa (patch) | |
tree | cc25debce76b3b1d8120ca44ea954df29a1685ed /git-gui.sh | |
parent | git-gui: Ensure msgfmt failure stops GNU make (diff) | |
parent | git-gui: Properly set the state of "Stage/Unstage Hunk" action (diff) | |
download | tgif-4b08aa3fef4258bf27f1bfa11fb9c0a8315c61aa.tar.xz |
Merge branch 'maint'
* maint:
git-gui: Properly set the state of "Stage/Unstage Hunk" action
git-gui: Fix detaching current branch during checkout
git-gui: Correct starting of git-remote to handle -w option
Conflicts:
git-gui.sh
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-x | git-gui.sh | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/git-gui.sh b/git-gui.sh index 5635eeae36..b3d447e598 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -289,7 +289,7 @@ proc _git_cmd {name} { set s [gets $f] close $f - switch -glob -- $s { + switch -glob -- [lindex $s 0] { #!*sh { set i sh } #!*perl { set i perl } #!*python { set i python } @@ -303,7 +303,7 @@ proc _git_cmd {name} { if {$interp eq {}} { error "git-$name requires $i (not in PATH)" } - set v [list $interp $p] + set v [concat [list $interp] [lrange $s 1 end] [list $p]] } else { # Assume it is builtin to git somehow and we # aren't actually able to see a file for it. @@ -2461,20 +2461,17 @@ proc popup_diff_menu {ctxm x y X Y} { set ::cursorX $x set ::cursorY $y if {$::ui_index eq $::current_diff_side} { - set s normal set l [mc "Unstage Hunk From Commit"] } else { - if {$current_diff_path eq {} - || ![info exists file_states($current_diff_path)] - || {_O} eq [lindex $file_states($current_diff_path) 0]} { - set s disabled - } else { - set s normal - } set l [mc "Stage Hunk For Commit"] } - if {$::is_3way_diff} { + if {$::is_3way_diff + || $current_diff_path eq {} + || ![info exists file_states($current_diff_path)] + || {_O} eq [lindex $file_states($current_diff_path) 0]} { set s disabled + } else { + set s normal } $ctxm entryconf $::ui_diff_applyhunk -state $s -label $l tk_popup $ctxm $X $Y |