From: Paul Mackerras Date: Fri, 02 May 2008 12:52:04 GMT Subject: Re: [PATCH] gitk: disable "Reset %s branch to here" when on a detached head Message-ID: <18459.3700.934377.597975@cargo.ozlabs.ibm.com> In-Reply-To: <200803181535.53635.barra_cuda@katamail.com> Michele Ballabio writes: > When we are on a detached head, reset has no sense, so disable > the line on the context menu. Sounds reasonable. > - $menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead] > + if {$mainhead ne {}} { > + $menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead] > + } else { > + $menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead] -state disabled I wonder if we can make this message something more appropriate than "Reset branch to here" (since $mainhead has to be the empty string here)? Not sure what I would suggest though. :) Paul.