Show peeled onion from upload-pack and server-info.

This updates git-ls-remote to show SHA1 names of objects that are
referred by tags, in the "ref^{}" notation.

This would make git-findtags (without -t flag) almost trivial.

    git-peek-remote . |
    sed -ne "s:^$target	"'refs/tags/\(.*\)^{}$:\1:p'

Also Pasky could do:

    git-ls-remote --tags $remote |
    sed -ne 's:\(	refs/tags/.*\)^{}$:\1:p'

to find out what object each of the remote tags refers to, and
if he has one locally, run "git-fetch $remote tag $tagname" to
automatically catch up with the upstream tags.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2005-10-13 18:57:40 -07:00
parent 5385f52da8
commit f6b42a81fd
3 changed files with 16 additions and 0 deletions

View File

@ -176,6 +176,7 @@ if test "$tags"
then
taglist=$(git-ls-remote --tags "$remote" |
sed -e '
/\^{}$/d
s/^[^ ]* //
s/.*/&:&/')
if test "$#" -gt 1