@matheusbsbs / matheus-bagliano / commits / 85b1f98871
Fork 0

"git-fetch --tags $URL" should not overwrite existing tags

Use the same --exclude-existing filter as we use for automatic tag following to avoid overwriting existing tags with replacement ones the other side created. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 11, 2007 at 13:41 UTC 85b1f98871f19617ff7ee8ec245fe4e817a74aa4
1 file changed +2 -15
git-fetch.sh
+2 -15
@@ -253,23 +253,10 @@ if test "$tags"
253 then
254 taglist=`IFS=' ' &&
255 echo "$ls_remote_result" |
256 + git-show-ref --exclude-existing=refs/tags/ |
257 while read sha1 name
258 do
258 - case "$sha1" in
259 - fail)
260 - exit 1
261 - esac
262 - case "$name" in
263 - *^*) continue ;;
264 - refs/tags/*) ;;
265 - *) continue ;;
266 - esac
267 - if git-check-ref-format "$name"
268 - then
269 - echo ".${name}:${name}"
270 - else
271 - echo >&2 "warning: tag ${name} ignored"
272 - fi
259 + echo ".${name}:${name}"
260 done` || exit
261 if test "$#" -gt 1
262 then