summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-03-30 05:13:12 (GMT)
committerPaul Mackerras <paulus@samba.org>2006-04-04 23:14:02 (GMT)
commite100712968cb781183a549f164e34596d6e7fcb2 (patch)
tree9f347ec8235a7e29f346e5778e90e33c1c91b77c /gitk
parent79b2c75e043ad85f9a6b1a8d890b601a2f761a0e (diff)
downloadgit-e100712968cb781183a549f164e34596d6e7fcb2.zip
git-e100712968cb781183a549f164e34596d6e7fcb2.tar.gz
git-e100712968cb781183a549f164e34596d6e7fcb2.tar.bz2
[PATCH] gitk: allow goto heads
This patch allows you to enter a head name in the SHA1 id: field. It also removes some unnecessary global declarations. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk7
1 files changed, 4 insertions, 3 deletions
diff --git a/gitk b/gitk
index 90afec9..4bc7946 100755
--- a/gitk
+++ b/gitk
@@ -2847,13 +2847,15 @@ proc sha1change {n1 n2 op} {
}
proc gotocommit {} {
- global sha1string currentid commitrow tagids
+ global sha1string currentid commitrow tagids headids
global displayorder numcommits
if {$sha1string == {}
|| ([info exists currentid] && $sha1string == $currentid)} return
if {[info exists tagids($sha1string)]} {
set id $tagids($sha1string)
+ } elseif {[info exists headids($sha1string)]} {
+ set id $headids($sha1string)
} else {
set id [string tolower $sha1string]
if {[regexp {^[0-9a-f]{4,39}$} $id]} {
@@ -2879,7 +2881,7 @@ proc gotocommit {} {
if {[regexp {^[0-9a-fA-F]{4,}$} $sha1string]} {
set type "SHA1 id"
} else {
- set type "Tag"
+ set type "Tag/Head"
}
error_popup "$type $sha1string is not known"
}
@@ -3370,7 +3372,6 @@ proc listrefs {id} {
proc rereadrefs {} {
global idtags idheads idotherrefs
- global tagids headids otherrefids
set refids [concat [array names idtags] \
[array names idheads] [array names idotherrefs]]