]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-gui.sh
git-gui: handle "deleted symlink" diff marker
[git.git] / git-gui.sh
index e495046c3b9a99106e8fa3506aad45bd911dd5c8..6d676097a6a3aeecfda3a752b7344dc88094956c 100755 (executable)
@@ -42,6 +42,8 @@ if {[catch {package require Tcl 8.4} err]
        exit 1
 }
 
+rename send {} ; # What an evil concept...
+
 ######################################################################
 ##
 ## enable verbose loading?
@@ -2441,20 +2443,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 "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 "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