Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-12 00:41:23 +0300
committerJunio C Hamano <junkio@cox.net>2007-02-13 10:31:00 +0300
commit85b1f98871f19617ff7ee8ec245fe4e817a74aa4 (patch)
tree543f5dfdd7cdd65550f087b18c4fff4840c268df /git-fetch.sh
parentacb39f64c6f5f0a3220da787fda9badad9f57554 (diff)
"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>
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-xgit-fetch.sh17
1 files changed, 2 insertions, 15 deletions
diff --git a/git-fetch.sh b/git-fetch.sh
index 357cac28b2..ca984e739a 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -253,23 +253,10 @@ if test "$tags"
then
taglist=`IFS=' ' &&
echo "$ls_remote_result" |
+ git-show-ref --exclude-existing=refs/tags/ |
while read sha1 name
do
- case "$sha1" in
- fail)
- exit 1
- esac
- case "$name" in
- *^*) continue ;;
- refs/tags/*) ;;
- *) continue ;;
- esac
- if git-check-ref-format "$name"
- then
- echo ".${name}:${name}"
- else
- echo >&2 "warning: tag ${name} ignored"
- fi
+ echo ".${name}:${name}"
done` || exit
if test "$#" -gt 1
then