Merge branch 'maint' of git://repo.or.cz/git-gui into maint
[git/git.git] / git-gui / lib / checkout_op.tcl
index 170f737..76f04f2 100644 (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