1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-02 15:28:21 +01:00

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
This commit is contained in:
Shawn O. Pearce 2007-09-03 23:07:59 -04:00
commit 4b08aa3fef
2 changed files with 9 additions and 12 deletions

View file

@ -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,21 +2461,18 @@ 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 {}
set l [mc "Stage Hunk For Commit"]
}
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
}
set l [mc "Stage Hunk For Commit"]
}
if {$::is_3way_diff} {
set s disabled
}
$ctxm entryconf $::ui_diff_applyhunk -state $s -label $l
tk_popup $ctxm $X $Y
}

View file

@ -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