git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: git@vger.kernel.org
Cc: John Kacur <jkacur@gmail.com>
Subject: git fetch overwriting local tags
Date: Wed, 23 Nov 2011 10:08:21 +0100	[thread overview]
Message-ID: <20111123090821.GL19986@pengutronix.de> (raw)

Hello,

John and I wondered about git fetch overwriting local tags. I was sure
enough to claim that git fetch won't overwrite local tags with remote
tags having the same name. But after John pointed me to

	http://www.pythian.com/news/9067/on-the-perils-of-importing-remote-tags-in-git/

I tested that (using Debian's 1.7.7.3) and really, git does overwrite
local tags.

Here is my test script:

	mkdir a
	cd a
	echo some content > some_file
	git init 
	git add some_file
	git commit -m 'some commit log'
	git tag some_tag

	cd ..

	mkdir b
	cd b
	echo some different content > another_file
	git init 
	git add another_file
	git commit -m 'another commit log'
	git tag some_tag

	git fetch --tags ../a

After that I have:

	git log -1 --oneline some_tag
	c4ad89a some commit log

so b's tag was overwritten.

Is this intended?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

             reply	other threads:[~2011-11-23  9:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23  9:08 Uwe Kleine-König [this message]
2011-11-23 22:16 ` git fetch overwriting local tags Jeff King
2011-11-24  7:07   ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111123090821.GL19986@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=git@vger.kernel.org \
    --cc=jkacur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).