{"thread":{"id":"14881","subject":"1.6.0.rc2: Duplicated refs when using git clone --mirror","startedAt":"2008-08-08T00:59:55Z","lastAt":"2008-08-08T06:41:13Z","messageCount":4,"participants":["Cesar Eduardo Barros","Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"86447","messageId":"489B9A8B.9050807@cesarb.net","threadId":"14881","inReplyTo":null,"subject":"1.6.0.rc2: Duplicated refs when using git clone --mirror","fromName":"Cesar Eduardo Barros","fromEmail":"cesarb@cesarb.net","sentAt":"2008-08-08T00:59:55Z","receivedAt":"2008-08-08T00:59:55Z","isPatch":false,"sender":{"key":"cesarb@cesarb.net","avatar":"https://avatars.githubusercontent.com/u/31324?v=4"},"body":"cesarb@delta:/tmp$ PATH=~/opt/git/bin:$PATH git --version\ngit version 1.6.0.rc2\ncesarb@delta:/tmp$ PATH=~/opt/git/bin:$PATH git clone --mirror \ngit://git.kernel.org/pub/scm/git/git.git\nInitialized empty Git repository in /tmp/git.git/\nremote: Counting objects: 80828, done.\nremote: Compressing objects: 100% (21488/21488), done.\nremote: Total 80828 (delta 58880), reused 79522 (delta 57902)\nReceiving objects: 100% (80828/80828), 16.84 MiB | 97 KiB/s, done.\nResolving deltas: 100% (58880/58880), done.\ncesarb@delta:/tmp$ cd git.git/\ncesarb@delta:/tmp/git.git$ PATH=~/opt/git/bin:$PATH git fetch\nwarning: Duplicated ref: refs/tags/gitgui-0.10.0\nwarning: Duplicated ref: refs/tags/gitgui-0.10.1\nwarning: Duplicated ref: refs/tags/gitgui-0.10.2\nwarning: Duplicated ref: refs/tags/gitgui-0.6.0\nwarning: Duplicated ref: refs/tags/gitgui-0.6.1\nwarning: Duplicated ref: refs/tags/gitgui-0.6.2\nwarning: Duplicated ref: refs/tags/gitgui-0.6.3\nwarning: Duplicated ref: refs/tags/gitgui-0.6.4\nwarning: Duplicated ref: refs/tags/gitgui-0.6.5\nwarning: Duplicated ref: refs/tags/gitgui-0.7.0\nwarning: Duplicated ref: refs/tags/gitgui-0.7.0-rc1\nwarning: Duplicated ref: refs/tags/gitgui-0.7.1\nwarning: Duplicated ref: refs/tags/gitgui-0.7.2\nwarning: Duplicated ref: refs/tags/gitgui-0.7.3\nwarning: Duplicated ref: refs/tags/gitgui-0.7.4\nwarning: Duplicated ref: refs/tags/gitgui-0.7.5\nwarning: Duplicated ref: refs/tags/gitgui-0.8.0\nwarning: Duplicated ref: refs/tags/gitgui-0.8.1\nwarning: Duplicated ref: refs/tags/gitgui-0.8.2\nwarning: Duplicated ref: refs/tags/gitgui-0.8.3\nwarning: Duplicated ref: refs/tags/gitgui-0.8.4\nwarning: Duplicated ref: refs/tags/gitgui-0.9.0\nwarning: Duplicated ref: refs/tags/gitgui-0.9.1\nwarning: Duplicated ref: refs/tags/gitgui-0.9.2\nwarning: Duplicated ref: refs/tags/gitgui-0.9.3\nwarning: Duplicated ref: refs/tags/junio-gpg-pub\nwarning: Duplicated ref: refs/tags/v0.99\nwarning: Duplicated ref: refs/tags/v0.99.9h\nwarning: Duplicated ref: refs/tags/v0.99.9i\nwarning: Duplicated ref: refs/tags/v0.99.9j\nwarning: Duplicated ref: refs/tags/v0.99.9k\nwarning: Duplicated ref: refs/tags/v0.99.9l\nwarning: Duplicated ref: refs/tags/v0.99.9m\nwarning: Duplicated ref: refs/tags/v0.99.9n\nwarning: Duplicated ref: refs/tags/v1.0.0\nwarning: Duplicated ref: refs/tags/v1.0.0a\nwarning: Duplicated ref: refs/tags/v1.0.0b\nwarning: Duplicated ref: refs/tags/v1.0.10\nwarning: Duplicated ref: refs/tags/v1.0.11\nwarning: Duplicated ref: refs/tags/v1.0.12\nwarning: Duplicated ref: refs/tags/v1.0.13\nwarning: Duplicated ref: refs/tags/v1.0.3\nwarning: Duplicated ref: refs/tags/v1.0.4\nwarning: Duplicated ref: refs/tags/v1.0.5\nwarning: Duplicated ref: refs/tags/v1.0.6\nwarning: Duplicated ref: refs/tags/v1.0.7\nwarning: Duplicated ref: refs/tags/v1.0.8\nwarning: Duplicated ref: refs/tags/v1.0.9\nwarning: Duplicated ref: refs/tags/v1.0rc1\nwarning: Duplicated ref: refs/tags/v1.0rc2\nwarning: Duplicated ref: refs/tags/v1.0rc3\nwarning: Duplicated ref: refs/tags/v1.0rc4\nwarning: Duplicated ref: refs/tags/v1.0rc5\nwarning: Duplicated ref: refs/tags/v1.0rc6\nwarning: Duplicated ref: refs/tags/v1.1.0\nwarning: Duplicated ref: refs/tags/v1.1.1\nwarning: Duplicated ref: refs/tags/v1.1.2\nwarning: Duplicated ref: refs/tags/v1.1.3\nwarning: Duplicated ref: refs/tags/v1.1.4\nwarning: Duplicated ref: refs/tags/v1.1.5\nwarning: Duplicated ref: refs/tags/v1.1.6\nwarning: Duplicated ref: refs/tags/v1.2.0\nwarning: Duplicated ref: refs/tags/v1.2.1\nwarning: Duplicated ref: refs/tags/v1.2.2\nwarning: Duplicated ref: refs/tags/v1.2.3\nwarning: Duplicated ref: refs/tags/v1.2.4\nwarning: Duplicated ref: refs/tags/v1.2.5\nwarning: Duplicated ref: refs/tags/v1.2.6\nwarning: Duplicated ref: refs/tags/v1.3.0\nwarning: Duplicated ref: refs/tags/v1.3.0-rc1\nwarning: Duplicated ref: refs/tags/v1.3.0-rc2\nwarning: Duplicated ref: refs/tags/v1.3.0-rc3\nwarning: Duplicated ref: refs/tags/v1.3.0-rc4\nwarning: Duplicated ref: refs/tags/v1.3.1\nwarning: Duplicated ref: refs/tags/v1.3.2\nwarning: Duplicated ref: refs/tags/v1.3.3\nwarning: Duplicated ref: refs/tags/v1.4.0\nwarning: Duplicated ref: refs/tags/v1.4.0-rc1\nwarning: Duplicated ref: refs/tags/v1.4.0-rc2\nwarning: Duplicated ref: refs/tags/v1.4.1\nwarning: Duplicated ref: refs/tags/v1.4.1-rc1\nwarning: Duplicated ref: refs/tags/v1.4.1-rc2\nwarning: Duplicated ref: refs/tags/v1.4.1.1\nwarning: Duplicated ref: refs/tags/v1.4.2\nwarning: Duplicated ref: refs/tags/v1.4.2-rc1\nwarning: Duplicated ref: refs/tags/v1.4.2-rc2\nwarning: Duplicated ref: refs/tags/v1.4.2-rc3\nwarning: Duplicated ref: refs/tags/v1.4.2-rc4\nwarning: Duplicated ref: refs/tags/v1.4.2.1\nwarning: Duplicated ref: refs/tags/v1.4.2.2\nwarning: Duplicated ref: refs/tags/v1.4.2.3\nwarning: Duplicated ref: refs/tags/v1.4.2.4\nwarning: Duplicated ref: refs/tags/v1.4.3\nwarning: Duplicated ref: refs/tags/v1.4.3-rc1\nwarning: Duplicated ref: refs/tags/v1.4.3-rc2\nwarning: Duplicated ref: refs/tags/v1.4.3-rc3\nwarning: Duplicated ref: refs/tags/v1.4.3.1\nwarning: Duplicated ref: refs/tags/v1.4.3.2\nwarning: Duplicated ref: refs/tags/v1.4.3.3\nwarning: Duplicated ref: refs/tags/v1.4.3.4\nwarning: Duplicated ref: refs/tags/v1.4.3.5\nwarning: Duplicated ref: refs/tags/v1.4.4\nwarning: Duplicated ref: refs/tags/v1.4.4-rc1\nwarning: Duplicated ref: refs/tags/v1.4.4-rc2\nwarning: Duplicated ref: refs/tags/v1.4.4.1\nwarning: Duplicated ref: refs/tags/v1.4.4.2\nwarning: Duplicated ref: refs/tags/v1.4.4.3\nwarning: Duplicated ref: refs/tags/v1.4.4.4\nwarning: Duplicated ref: refs/tags/v1.4.4.5\nwarning: Duplicated ref: refs/tags/v1.5.0\nwarning: Duplicated ref: refs/tags/v1.5.0-rc0\nwarning: Duplicated ref: refs/tags/v1.5.0-rc1\nwarning: Duplicated ref: refs/tags/v1.5.0-rc2\nwarning: Duplicated ref: refs/tags/v1.5.0-rc3\nwarning: Duplicated ref: refs/tags/v1.5.0-rc4\nwarning: Duplicated ref: refs/tags/v1.5.0.1\nwarning: Duplicated ref: refs/tags/v1.5.0.2\nwarning: Duplicated ref: refs/tags/v1.5.0.3\nwarning: Duplicated ref: refs/tags/v1.5.0.4\nwarning: Duplicated ref: refs/tags/v1.5.0.5\nwarning: Duplicated ref: refs/tags/v1.5.0.6\nwarning: Duplicated ref: refs/tags/v1.5.0.7\nwarning: Duplicated ref: refs/tags/v1.5.1\nwarning: Duplicated ref: refs/tags/v1.5.1-rc1\nwarning: Duplicated ref: refs/tags/v1.5.1-rc2\nwarning: Duplicated ref: refs/tags/v1.5.1-rc3\nwarning: Duplicated ref: refs/tags/v1.5.1.1\nwarning: Duplicated ref: refs/tags/v1.5.1.2\nwarning: Duplicated ref: refs/tags/v1.5.1.3\nwarning: Duplicated ref: refs/tags/v1.5.1.4\nwarning: Duplicated ref: refs/tags/v1.5.1.5\nwarning: Duplicated ref: refs/tags/v1.5.1.6\nwarning: Duplicated ref: refs/tags/v1.5.2\nwarning: Duplicated ref: refs/tags/v1.5.2-rc0\nwarning: Duplicated ref: refs/tags/v1.5.2-rc1\nwarning: Duplicated ref: refs/tags/v1.5.2-rc2\nwarning: Duplicated ref: refs/tags/v1.5.2-rc3\nwarning: Duplicated ref: refs/tags/v1.5.2.1\nwarning: Duplicated ref: refs/tags/v1.5.2.2\nwarning: Duplicated ref: refs/tags/v1.5.2.3\nwarning: Duplicated ref: refs/tags/v1.5.2.4\nwarning: Duplicated ref: refs/tags/v1.5.2.5\nwarning: Duplicated ref: refs/tags/v1.5.3\nwarning: Duplicated ref: refs/tags/v1.5.3-rc0\nwarning: Duplicated ref: refs/tags/v1.5.3-rc1\nwarning: Duplicated ref: refs/tags/v1.5.3-rc2\nwarning: Duplicated ref: refs/tags/v1.5.3-rc3\nwarning: Duplicated ref: refs/tags/v1.5.3-rc4\nwarning: Duplicated ref: refs/tags/v1.5.3-rc5\nwarning: Duplicated ref: refs/tags/v1.5.3-rc6\nwarning: Duplicated ref: refs/tags/v1.5.3-rc7\nwarning: Duplicated ref: refs/tags/v1.5.3.1\nwarning: Duplicated ref: refs/tags/v1.5.3.2\nwarning: Duplicated ref: refs/tags/v1.5.3.3\nwarning: Duplicated ref: refs/tags/v1.5.3.4\nwarning: Duplicated ref: refs/tags/v1.5.3.5\nwarning: Duplicated ref: refs/tags/v1.5.3.6\nwarning: Duplicated ref: refs/tags/v1.5.3.7\nwarning: Duplicated ref: refs/tags/v1.5.3.8\nwarning: Duplicated ref: refs/tags/v1.5.4\nwarning: Duplicated ref: refs/tags/v1.5.4-rc0\nwarning: Duplicated ref: refs/tags/v1.5.4-rc1\nwarning: Duplicated ref: refs/tags/v1.5.4-rc2\nwarning: Duplicated ref: refs/tags/v1.5.4-rc3\nwarning: Duplicated ref: refs/tags/v1.5.4-rc4\nwarning: Duplicated ref: refs/tags/v1.5.4-rc5\nwarning: Duplicated ref: refs/tags/v1.5.4.1\nwarning: Duplicated ref: refs/tags/v1.5.4.2\nwarning: Duplicated ref: refs/tags/v1.5.4.3\nwarning: Duplicated ref: refs/tags/v1.5.4.4\nwarning: Duplicated ref: refs/tags/v1.5.4.5\nwarning: Duplicated ref: refs/tags/v1.5.4.6\nwarning: Duplicated ref: refs/tags/v1.5.5\nwarning: Duplicated ref: refs/tags/v1.5.5-rc0\nwarning: Duplicated ref: refs/tags/v1.5.5-rc1\nwarning: Duplicated ref: refs/tags/v1.5.5-rc2\nwarning: Duplicated ref: refs/tags/v1.5.5-rc3\nwarning: Duplicated ref: refs/tags/v1.5.5.1\nwarning: Duplicated ref: refs/tags/v1.5.5.2\nwarning: Duplicated ref: refs/tags/v1.5.5.3\nwarning: Duplicated ref: refs/tags/v1.5.5.4\nwarning: Duplicated ref: refs/tags/v1.5.5.5\nwarning: Duplicated ref: refs/tags/v1.5.6\nwarning: Duplicated ref: refs/tags/v1.5.6-rc0\nwarning: Duplicated ref: refs/tags/v1.5.6-rc1\nwarning: Duplicated ref: refs/tags/v1.5.6-rc2\nwarning: Duplicated ref: refs/tags/v1.5.6-rc3\nwarning: Duplicated ref: refs/tags/v1.5.6.1\nwarning: Duplicated ref: refs/tags/v1.5.6.2\nwarning: Duplicated ref: refs/tags/v1.5.6.3\nwarning: Duplicated ref: refs/tags/v1.5.6.4\nwarning: Duplicated ref: refs/tags/v1.5.6.5\nwarning: Duplicated ref: refs/tags/v1.6.0-rc0\nwarning: Duplicated ref: refs/tags/v1.6.0-rc1\nwarning: Duplicated ref: refs/tags/v1.6.0-rc2\nwarning: Duplicated ref: refs/tags/v0.99.9g\ncesarb@delta:/tmp/git.git$\n\nThere is no file in refs/; the contents of packed-refs are like:\n\n# pack-refs with: peeled\nb7d75e49508ac928677f5cb83f490cf40a7c83d3 refs/tags/v1.6.0-rc2\n^1fdf6ee6f81b31b299a8039832f45290faa4583a\nad6137f51f5f67e2558849629332c7443ed01108 refs/tags/v1.6.0-rc1\n^8e1db3871c767cb17b5e0eeb7bea8d967821a055\n4be80e6b423b9ceffab50e120855806712ab3255 refs/tags/v1.6.0-rc0\n^93310a40eb022a0e36e7c618921931d8ffc31fd1\n07cca3b30ee2b5d060e44e5b18d7c22929c63d1a refs/tags/v1.5.6.5\n^781c1834f5419bdf81bb7f3750170ccd6b809174\n[...]\n33682a5e98adfd8ba4ce0e21363c443bd273eb77 refs/tags/gitgui-0.10.1\n^729ffa50f75a025935623bfc58d0932c65f7de2f\nd5aef6e4d58cfe1549adef5b436f3ace984e8c86 refs/tags/gitgui-0.10.0\n^3d654be48f65545c4d3e35f5d3bbed5489820930\nb7d75e49508ac928677f5cb83f490cf40a7c83d3 refs/tags/v1.6.0-rc2\n^1fdf6ee6f81b31b299a8039832f45290faa4583a\nad6137f51f5f67e2558849629332c7443ed01108 refs/tags/v1.6.0-rc1\n^8e1db3871c767cb17b5e0eeb7bea8d967821a055\n4be80e6b423b9ceffab50e120855806712ab3255 refs/tags/v1.6.0-rc0\n^93310a40eb022a0e36e7c618921931d8ffc31fd1\n07cca3b30ee2b5d060e44e5b18d7c22929c63d1a refs/tags/v1.5.6.5\n^781c1834f5419bdf81bb7f3750170ccd6b809174\n[...]\n33682a5e98adfd8ba4ce0e21363c443bd273eb77 refs/tags/gitgui-0.10.1\n^729ffa50f75a025935623bfc58d0932c65f7de2f\nd5aef6e4d58cfe1549adef5b436f3ace984e8c86 refs/tags/gitgui-0.10.0\n^3d654be48f65545c4d3e35f5d3bbed5489820930\n19a1e065c865db403a41af97b2e9e81f1d01dd9e refs/heads/todo\n0e60d74cc02f6a0af58a1f99e54509dafc7c8f6a refs/heads/pu\n9c632062aee88de890e8b30d8763f83abe1da113 refs/heads/next\n1fdf6ee6f81b31b299a8039832f45290faa4583a refs/heads/master\n99ad2efc3f7764a1c21e464412af95a8ffe3b5d6 refs/heads/man\n781c1834f5419bdf81bb7f3750170ccd6b809174 refs/heads/maint\nb53db3ca58a8a65d8de3b9fa048d410757edc38f refs/heads/html\n\n-- \nCesar Eduardo Barros\ncesarb@cesarb.net\ncesar.barros@gmail.com\n"},{"id":"86450","messageId":"alpine.DEB.1.00.0808080428520.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14881","inReplyTo":"489B9A8B.9050807@cesarb.net","subject":"[PATCH] clone --mirror: avoid storing repeated tags","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-08T02:29:35Z","receivedAt":"2008-08-08T02:29:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nWith --mirror, clone asks for refs/* already, so it does not need to\nask for ref/tags/*, too.\n\nNoticed by Cesar Eduardo Barros.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n builtin-clone.c  |    3 ++-\n t/t5601-clone.sh |   12 ++++++++++++\n 2 files changed, 14 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-clone.c b/builtin-clone.c\nindex 8612d59..c0e3086 100644\n--- a/builtin-clone.c\n+++ b/builtin-clone.c\n@@ -330,7 +330,8 @@ static struct ref *write_remote_refs(const struct ref *refs,\n \tstruct ref *r;\n \n \tget_fetch_map(refs, refspec, &tail, 0);\n-\tget_fetch_map(refs, tag_refspec, &tail, 0);\n+\tif (!option_mirror)\n+\t\tget_fetch_map(refs, tag_refspec, &tail, 0);\n \n \tfor (r = local_refs; r; r = r->next)\n \t\tadd_extra_ref(r->peer_ref->name, r->old_sha1, 0);\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex a13b6f9..59c65fe 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -95,4 +95,16 @@ test_expect_success 'clone --bare names the local repository <name>.git' '\n \n '\n \n+test_expect_success 'clone --mirror does not repeat tags' '\n+\n+\t(cd src &&\n+\t git tag some-tag HEAD) &&\n+\tgit clone --mirror src mirror2 &&\n+\t(cd mirror2 &&\n+\t git show-ref 2> clone.err > clone.out) &&\n+\ttest_must_fail grep Duplicate mirror2/clone.err &&\n+\tgrep some-tag mirror2/clone.out\n+\n+'\n+\n test_done\n-- \n1.6.0.rc1.112.gebbe4\n"},{"id":"86451","messageId":"7vej50gl3v.fsf@gitster.siamese.dyndns.org","threadId":"14881","inReplyTo":"alpine.DEB.1.00.0808080428520.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH] clone --mirror: avoid storing repeated tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-08T04:57:08Z","receivedAt":"2008-08-08T04:57:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks for reporting and a quick fix.\n\nThis made me wonder if this relatively new \"pack cloned refs\" codepath has\nfunny interaction with --reference which is another user of add_extra_refs(),\nbut I think it is safe (we clear the real \"extra\" ones used during the\nobject transfer before calling write_remote_refs()).\n"},{"id":"86457","messageId":"7vzlnof1py.fsf@gitster.siamese.dyndns.org","threadId":"14881","inReplyTo":"7vej50gl3v.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] clone --mirror: avoid storing repeated tags","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-08T06:41:13Z","receivedAt":"2008-08-08T06:41:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Thanks for reporting and a quick fix.\n\nBy the way, Dscho, do you have comments on recent filter-branch thread and\npatches?\n"}]}