summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-09-04 03:07:59 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-09-04 03:07:59 (GMT)
commit4b08aa3fef4258bf27f1bfa11fb9c0a8315c61aa (patch)
treecc25debce76b3b1d8120ca44ea954df29a1685ed
parent12fb223326b561132d528bb010c6bdeaa828acd3 (diff)
parent047d94d505c9837a60c28e121de65471dadce74b (diff)
downloadgit-4b08aa3fef4258bf27f1bfa11fb9c0a8315c61aa.zip
git-4b08aa3fef4258bf27f1bfa11fb9c0a8315c61aa.tar.gz
git-4b08aa3fef4258bf27f1bfa11fb9c0a8315c61aa.tar.bz2
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
-rwxr-xr-xgit-gui.sh19
-rw-r--r--lib/checkout_op.tcl2
2 files changed, 9 insertions, 12 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 5635eea..b3d447e 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
diff --git a/lib/checkout_op.tcl b/lib/checkout_op.tcl
index b98c9cb..f07262c 100644
--- a/lib/checkout_op.tcl
+++ b/lib/checkout_op.tcl
@@ -396,7 +396,7 @@ method _after_readtree {} {
set is_detached 0
}
} else {
- if {$new_hash ne $HEAD} {
+ if {!$is_detached || $new_hash ne $HEAD} {
append log " to $new_expr"
if {[catch {
_detach_HEAD $log $new_hash