Skip to content

Commit

Permalink
[PATCH] gitk: Use show-ref instead of ls-remote
Browse files Browse the repository at this point in the history
It used to be ls-remote on self was the only easy way to grab
the ref information.  Now we have show-ref which does not
involve fork and IPC, so use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Junio C Hamano authored and Paul Mackerras committed Feb 14, 2007
1 parent e9937d2 commit 7426eb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitk
Original file line number Diff line number Diff line change
@@ -309,9 +309,9 @@ proc readrefs {} {
foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
catch {unset $v}
}
set refd [open [list | git ls-remote [gitdir]] r]
set refd [open [list | git show-ref] r]
while {0 <= [set n [gets $refd line]]} {
if {![regexp {^([0-9a-f]{40}) refs/([^^]*)$} $line \
if {![regexp {^([0-9a-f]{40}) refs/([^^]*)$} $line \
match id path]} {
continue
}

0 comments on commit 7426eb7

Please sign in to comment.