git-fetch: follow lightweit tags as well.

This side-ports commit fd19f620 from Cogito, in which I fixed
exactly the same bug.  Somehow nobody noticed this for a long
time in git.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2006-11-18 21:39:17 -08:00
parent 198a4f4ff0
commit 6c96c0f194
2 changed files with 19 additions and 2 deletions

View File

@ -432,10 +432,11 @@ case "$no_tags$tags" in
# using local tracking branch.
taglist=$(IFS=" " &&
git-ls-remote $upload_pack --tags "$remote" |
sed -ne 's|^\([0-9a-f]*\)[ ]\(refs/tags/.*\)^{}$|\1 \2|p' |
sed -n -e 's|^\('"$_x40"'\) \(refs/tags/.*\)^{}$|\1 \2|p' \
-e 's|^\('"$_x40"'\) \(refs/tags/.*\)$|\1 \2|p' |
while read sha1 name
do
git-show-ref --verify --quiet -- $name && continue
git-show-ref --verify --quiet -- "$name" && continue
git-check-ref-format "$name" || {
echo >&2 "warning: tag ${name} ignored"
continue