summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4769489)
raw | patch | inline | side by side (parent: 4769489)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 23 Nov 2006 05:57:14 +0000 (21:57 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 24 Nov 2006 00:54:54 +0000 (16:54 -0800) |
This will become necessary to update the dumb protocol
transports to fetch from a repository with packed and then
pruned tags.
Signed-off-by: Junio C Hamano <junkio@cox.net>
transports to fetch from a repository with packed and then
pruned tags.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-fetch.sh | patch | blob | history |
diff --git a/git-fetch.sh b/git-fetch.sh
index eb32476bbdc98cc9a34d4026575e4d1a608289be..170c2cb048057e58b568888ea121da18cd63c1da 100755 (executable)
--- a/git-fetch.sh
+++ b/git-fetch.sh
: >"$GIT_DIR/FETCH_HEAD"
fi
+# Global that is reused later
+ls_remote_result=$(git ls-remote $upload_pack "$remote") ||
+ die "Cannot find the reflist at $remote"
+
append_fetch_head () {
head_="$1"
remote_="$2"
if test "$tags"
then
taglist=`IFS=" " &&
- (
- git-ls-remote $upload_pack --tags "$remote" ||
- echo fail ouch
- ) |
+ echo "$ls_remote_result" |
while read sha1 name
do
case "$sha1" in
esac
case "$name" in
*^*) continue ;;
+ refs/tags/*) ;;
+ *) continue ;;
esac
if git-check-ref-format "$name"
then
# effective only when we are following remote branch
# using local tracking branch.
taglist=$(IFS=" " &&
- git-ls-remote $upload_pack --tags "$remote" |
+ echo "$ls_remote_result" |
sed -n -e 's|^\('"$_x40"'\) \(refs/tags/.*\)^{}$|\1 \2|p' \
-e 's|^\('"$_x40"'\) \(refs/tags/.*\)$|\1 \2|p' |
while read sha1 name