Git development
 help / color / mirror / Atom feed
* invalid command name "listrefs"
@ 2006-06-11 16:50 Junio C Hamano
  2006-06-11 23:35 ` Paul Mackerras
  0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2006-06-11 16:50 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git

Starting gitk, "File->Reread references" results in an error
dialog.

This patch resurrects the procedure from an older version, and it
seems to work for me, but with the updated code it might be that
you wanted to use a different mechanism to implement rereadrefs
procedure -- I dunno.

-- >8 --
gitk: rereadrefs wants listrefs 

The listrefs procedure was removed during the course of
development, but there is still a user of it, so resurrect it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/gitk b/gitk
index 9be10a4..ba4644f 100755
--- a/gitk
+++ b/gitk
@@ -5196,6 +5196,24 @@ proc rereadrefs {} {
     }
 }
 
+proc listrefs {id} {
+    global idtags idheads idotherrefs
+
+    set x {}
+    if {[info exists idtags($id)]} {
+	set x $idtags($id)
+    }
+    set y {}
+    if {[info exists idheads($id)]} {
+	set y $idheads($id)
+    }
+    set z {}
+    if {[info exists idotherrefs($id)]} {
+	set z $idotherrefs($id)
+    }
+    return [list $x $y $z]
+}
+
 proc showtag {tag isnew} {
     global ctext tagcontents tagids linknum
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: invalid command name "listrefs"
  2006-06-11 16:50 invalid command name "listrefs" Junio C Hamano
@ 2006-06-11 23:35 ` Paul Mackerras
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2006-06-11 23:35 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio,

> Starting gitk, "File->Reread references" results in an error
> dialog.
> 
> This patch resurrects the procedure from an older version, and it
> seems to work for me, but with the updated code it might be that
> you wanted to use a different mechanism to implement rereadrefs
> procedure -- I dunno.

Thanks for pointing that out.  I had removed listrefs in the course of
doing some changes that I later dropped; not reinstating listrefs at
that point was just an oversight.

Paul.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-11 23:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-11 16:50 invalid command name "listrefs" Junio C Hamano
2006-06-11 23:35 ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox