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:
commit
4b08aa3fef
2 changed files with 9 additions and 12 deletions
19
git-gui.sh
19
git-gui.sh
|
@ -289,7 +289,7 @@ proc _git_cmd {name} {
|
||||||
set s [gets $f]
|
set s [gets $f]
|
||||||
close $f
|
close $f
|
||||||
|
|
||||||
switch -glob -- $s {
|
switch -glob -- [lindex $s 0] {
|
||||||
#!*sh { set i sh }
|
#!*sh { set i sh }
|
||||||
#!*perl { set i perl }
|
#!*perl { set i perl }
|
||||||
#!*python { set i python }
|
#!*python { set i python }
|
||||||
|
@ -303,7 +303,7 @@ proc _git_cmd {name} {
|
||||||
if {$interp eq {}} {
|
if {$interp eq {}} {
|
||||||
error "git-$name requires $i (not in PATH)"
|
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 {
|
} else {
|
||||||
# Assume it is builtin to git somehow and we
|
# Assume it is builtin to git somehow and we
|
||||||
# aren't actually able to see a file for it.
|
# 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 ::cursorX $x
|
||||||
set ::cursorY $y
|
set ::cursorY $y
|
||||||
if {$::ui_index eq $::current_diff_side} {
|
if {$::ui_index eq $::current_diff_side} {
|
||||||
set s normal
|
|
||||||
set l [mc "Unstage Hunk From Commit"]
|
set l [mc "Unstage Hunk From Commit"]
|
||||||
} else {
|
} 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"]
|
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
|
set s disabled
|
||||||
|
} else {
|
||||||
|
set s normal
|
||||||
}
|
}
|
||||||
$ctxm entryconf $::ui_diff_applyhunk -state $s -label $l
|
$ctxm entryconf $::ui_diff_applyhunk -state $s -label $l
|
||||||
tk_popup $ctxm $X $Y
|
tk_popup $ctxm $X $Y
|
||||||
|
|
|
@ -396,7 +396,7 @@ method _after_readtree {} {
|
||||||
set is_detached 0
|
set is_detached 0
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if {$new_hash ne $HEAD} {
|
if {!$is_detached || $new_hash ne $HEAD} {
|
||||||
append log " to $new_expr"
|
append log " to $new_expr"
|
||||||
if {[catch {
|
if {[catch {
|
||||||
_detach_HEAD $log $new_hash
|
_detach_HEAD $log $new_hash
|
||||||
|
|
Loading…
Reference in a new issue