summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 198a4f4)
raw | patch | inline | side by side (parent: 198a4f4)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 19 Nov 2006 05:39:17 +0000 (21:39 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 20 Nov 2006 02:44:23 +0000 (18:44 -0800) |
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>
exactly the same bug. Somehow nobody noticed this for a long
time in git.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-fetch.sh | patch | blob | history | |
t/t5510-fetch.sh | patch | blob | history |
diff --git a/git-fetch.sh b/git-fetch.sh
index 7442dd2ca54ffc3744b260ee10309d2495afd5fd..eb32476bbdc98cc9a34d4026575e4d1a608289be 100755 (executable)
--- a/git-fetch.sh
+++ b/git-fetch.sh
# 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
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index df0ae4811b29668c8c0918fec3d7b7b14369dee9..a11ab0ad41a006f9f20d8ec6172d34e6c7f92d41 100755 (executable)
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
cut -f -2 .git/FETCH_HEAD >actual &&
diff expected actual'
+test_expect_success 'fetch following tags' '
+
+ cd "$D" &&
+ git tag -a -m 'annotated' anno HEAD &&
+ git tag light HEAD &&
+
+ mkdir four &&
+ cd four &&
+ git init-db &&
+
+ git fetch .. :track &&
+ git show-ref --verify refs/tags/anno &&
+ git show-ref --verify refs/tags/light
+
+'
+
test_done