Fetching tags overwrites existing tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If have a repository with a tag "v1.0.0" and I add a remote repository
which also has a tag "v1.0.0" tag is overwritten.

Google found [1] from 2011 and option 3 is what I'd like to see. Has it been
implemented and I just don't see it?

[1]: https://groups.google.com/forum/#!topic/git-version-control/0l_rJFyTE60


Here is an example demonstrating what I see:

$ echo abc > abc.txt
$ git init .
Initialized empty Git repository in
/home/wink/prgs/git/investigate-fetch-tags/.git/
$ git add *
$ git commit -m "Initial commit"
[master (root-commit) 1116fdc] Initial commit
 1 file changed, 1 insertion(+)
 create mode 100644 abc.txt
$ git tag v1.0.0
$ git remote add gbenchmark git@xxxxxxxxxx:google/benchmark
$ git log --graph --format="%h %s %d"
* 1116fdc Initial commit  (HEAD -> master, tag: v1.0.0)
$ git fetch --tags gbenchmark
warning: no common commits
remote: Counting objects: 4400, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 4400 (delta 5), reused 5 (delta 3), pack-reused 4382
Receiving objects: 100% (4400/4400), 1.33 MiB | 2.81 MiB/s, done.
Resolving deltas: 100% (2863/2863), done.
>From github.com:google/benchmark
 * [new branch]      clangtidy       -> gbenchmark/clangtidy
 * [new branch]      iter_report     -> gbenchmark/iter_report
 * [new branch]      master          -> gbenchmark/master
 * [new branch]      releasing       -> gbenchmark/releasing
 * [new branch]      reportercleanup -> gbenchmark/reportercleanup
 * [new branch]      rmheaders       -> gbenchmark/rmheaders
 * [new branch]      v2              -> gbenchmark/v2
 * [new tag]         v0.0.9          -> v0.0.9
 * [new tag]         v0.1.0          -> v0.1.0
 t [tag update]      v1.0.0          -> v1.0.0
 * [new tag]         v1.1.0          -> v1.1.0
 * [new tag]         v1.2.0          -> v1.2.0
 * [new tag]         v1.3.0          -> v1.3.0
 * [new tag]         v1.4.0          -> v1.4.0
$ git log --graph --format="%h %s %d"
* 1116fdc Initial commit  (HEAD -> master)

As you can see the tag on 1116fdc is gone, v1.0.0 tag has been updated
and now its pointing to the tag in gbenchmark:

$ git log -5 --graph --format="%h %s %d" v1.0.0
*   cd525ae Merge pull request #171 from eliben/update-doc-userealtime
 (tag: v1.0.0)
|\
| * c7ab1b9 Update README to mention UseRealTime for wallclock time
measurements.
|/
* f662e8b Rename OS_MACOSX macro to new name BENCHMARK_OS_MACOSX. Fix #169
*   0a1f484 Merge pull request #166 from disconnect3d/master
|\
| * d2917bc Fixes #165: CustomArguments ret type in README
|/

Ideally I would have liked the tags fetched from gbenchmark to have a prefix
of gbenchmark/, like the branches have, maybe something like:

$ git fetch --tags gbenchmark
...
 * [new branch]      v2              -> gbenchmark/v2
 * [new tag]         v0.0.9          -> gbenchmark/v0.0.9
 * [new tag]         v0.1.0          -> gbenchmark/v0.1.0
 * [new tag]         v1.0.0          -> gbenchmark/v1.0.0
 * [new tag]         v1.1.0          -> gbenchmark/v1.1.0
 * [new tag]         v1.2.0          -> gbenchmark/v1.2.0
 * [new tag]         v1.3.0          -> gbenchmark/v1.3.0
 * [new tag]         v1.4.0          -> gbenchmark/v1.4.0


-- Wink



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux