X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-gui%2Flib%2Fcheckout_op.tcl;fp=git-gui%2Flib%2Fcheckout_op.tcl;h=76f04f2854e85d51caface604d4fc10627f67620;hb=9269df96105dff5ecc137b598ac7664d218ac6be;hp=170f737f611b48fa901e1789ec6d4f4d64834537;hpb=be510cfef3d8344007bd34128ca6eb799b714c8c;p=git.git diff --git a/git-gui/lib/checkout_op.tcl b/git-gui/lib/checkout_op.tcl index 170f737f6..76f04f285 100644 --- a/git-gui/lib/checkout_op.tcl +++ b/git-gui/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