[PATCH] gitk: Use show-ref instead of ls-remote
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>
This commit is contained in:

committed by
Paul Mackerras

parent
e9937d2a03
commit
7426eb7469
2
gitk
2
gitk
@ -309,7 +309,7 @@ proc readrefs {} {
|
|||||||
foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
|
foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
|
||||||
catch {unset $v}
|
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]]} {
|
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]} {
|
match id path]} {
|
||||||
|
Reference in New Issue
Block a user