{"thread":{"id":"30310","subject":"tags not present in bare clone","startedAt":"2012-04-23T17:28:32Z","lastAt":"2012-04-23T20:43:45Z","messageCount":4,"participants":["Patricia Bittencourt Egeland","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"189901","messageId":"0BE9553B-C799-43D5-BA9A-28FC83CA0773@linea.gov.br","threadId":"30310","inReplyTo":null,"subject":"tags not present in bare clone","fromName":"Patricia Bittencourt Egeland","fromEmail":"pbegeland@linea.gov.br","sentAt":"2012-04-23T17:28:32Z","receivedAt":"2012-04-23T17:28:32Z","isPatch":false,"sender":{"key":"pbegeland@linea.gov.br","avatar":null},"body":"Hi,\n\n       I'm trying to create a bare clone from a regular repo (all locally; in the same machine). However a tag created in the regular repo can't be found in the fresh bare clone.\n       I expected that the tags would also be present just like anything from \"refs\". Am I wrong about that? \n\nThanks,\nPatricia\n"},{"id":"189910","messageId":"xmqqsjfui7gn.fsf@junio.mtv.corp.google.com","threadId":"30310","inReplyTo":"0BE9553B-C799-43D5-BA9A-28FC83CA0773@linea.gov.br","subject":"Re: tags not present in bare clone","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-23T19:17:12Z","receivedAt":"2012-04-23T19:17:12Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patricia Bittencourt Egeland <pbegeland@linea.gov.br> writes:\n\n>        I'm trying to create a bare clone from a regular repo (all\n>        locally; in the same machine). However a tag created in the\n>        regular repo can't be found in the fresh bare clone.  I\n>        expected that the tags would also be present just like anything\n>        from \"refs\". Am I wrong about that?\n\nReproduction recipe???\n\nA simple and straightforward attempt to reproduce what you said you did\nin your message does not exhibit any problem.\n\n    $ mkdir -p /var/tmp/junk && cd /var/tmp/junk\n    $ git init src && cd src\n    Initialized empty Git repository in /var/tmp/junk/src/.git/\n    $ echo frotz >xyzzy && git add xyzzy && git commit -m initial\n    [master (root-commit) b9c684a] initial\n     1 file changed, 1 insertion(+)\n     create mode 100644 xyzzy\n    $ echo nitfol >xyzzy && git commit -a -m second\n    [master 6982d52] second\n     1 file changed, 1 insertion(+), 1 deletion(-)\n    $ git tag -a -m 'First revision' v1.0 HEAD^\n    $ git tag -a -m 'Second revision' v2.0 HEAD\n    $ git for-each-ref\n    6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/heads/master\n    33a6b315ffb461cba32d84ecd1692525a0846f5a tag\trefs/tags/v1.0\n    0d3f9dce20e28c6898423eb4a2c2010908e46a6c tag\trefs/tags/v2.0\n    $ cd ../ ;# back at /var/tmp/junk\n    $ git clone src dst\n    Cloning into 'dst'...\n    done.\n    $ cd dst\n    $ git for-each-ref\n    6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/heads/master\n    6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/remotes/origin/HEAD\n    6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/remotes/origin/master\n    33a6b315ffb461cba32d84ecd1692525a0846f5a tag\trefs/tags/v1.0\n    0d3f9dce20e28c6898423eb4a2c2010908e46a6c tag\trefs/tags/v2.0\n"},{"id":"189911","messageId":"xmqqobqii7c2.fsf@junio.mtv.corp.google.com","threadId":"30310","inReplyTo":"xmqqsjfui7gn.fsf@junio.mtv.corp.google.com","subject":"Re: tags not present in bare clone","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-23T19:19:57Z","receivedAt":"2012-04-23T19:19:57Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Patricia Bittencourt Egeland <pbegeland@linea.gov.br> writes:\n>\n>>        I'm trying to create a bare clone from a regular repo (all\n>>        locally; in the same machine). However a tag created in the\n>>        regular repo can't be found in the fresh bare clone.  I\n>>        expected that the tags would also be present just like anything\n>>        from \"refs\". Am I wrong about that?\n>\n> Reproduction recipe???\n>\n> A simple and straightforward attempt to reproduce what you said you did\n> in your message does not exhibit any problem.\n> ...\n\nOops, I forgot --bare.\n\n>     $ cd ../ ;# back at /var/tmp/junk\n>     $ git clone src dst\n\nThis should be \"git --bare clone src dst\" (or \"git clone --bare src\ndst\").\n\nBut everything else in my previous message still holds true.  I am\ngetting the identical output as the following.\n\n>     Cloning into 'dst'...\n>     done.\n>     $ cd dst\n>     $ git for-each-ref\n>     6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/heads/master\n>     6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/remotes/origin/HEAD\n>     6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/remotes/origin/master\n>     33a6b315ffb461cba32d84ecd1692525a0846f5a tag\trefs/tags/v1.0\n>     0d3f9dce20e28c6898423eb4a2c2010908e46a6c tag\trefs/tags/v2.0\n"},{"id":"189913","messageId":"98431788-0ED7-4ADB-972A-193587433216@linea.gov.br","threadId":"30310","inReplyTo":"xmqqobqii7c2.fsf@junio.mtv.corp.google.com","subject":"Re: tags not present in bare clone","fromName":"Patricia Bittencourt Egeland","fromEmail":"pbegeland@linea.gov.br","sentAt":"2012-04-23T20:43:45Z","receivedAt":"2012-04-23T20:43:45Z","isPatch":false,"sender":{"key":"pbegeland@linea.gov.br","avatar":null},"body":"Thanks Junio. \nI confirm that I can see the tags. \nI was looking (ls) in .git/refs/tags, only. \n\nBut, after more search, it looks like tags may be stored in .git/packed-refs to improve a repo access. I didn't know about that.\nIt is also good to know about \"git for-each-refs\" to list tags and the commit they point to. \n\nThanks,\nPatricia\n\n\nOn Apr 23, 2012, at 1:19 PM, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n>> Patricia Bittencourt Egeland <pbegeland@linea.gov.br> writes:\n>> \n>>>       I'm trying to create a bare clone from a regular repo (all\n>>>       locally; in the same machine). However a tag created in the\n>>>       regular repo can't be found in the fresh bare clone.  I\n>>>       expected that the tags would also be present just like anything\n>>>       from \"refs\". Am I wrong about that?\n>> \n>> Reproduction recipe???\n>> \n>> A simple and straightforward attempt to reproduce what you said you did\n>> in your message does not exhibit any problem.\n>> ...\n> \n> Oops, I forgot --bare.\n> \n>>    $ cd ../ ;# back at /var/tmp/junk\n>>    $ git clone src dst\n> \n> This should be \"git --bare clone src dst\" (or \"git clone --bare src\n> dst\").\n> \n> But everything else in my previous message still holds true.  I am\n> getting the identical output as the following.\n> \n>>    Cloning into 'dst'...\n>>    done.\n>>    $ cd dst\n>>    $ git for-each-ref\n>>    6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/heads/master\n>>    6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/remotes/origin/HEAD\n>>    6982d523f08b93dc6862ae80e80065b208d0ba85 commit\trefs/remotes/origin/master\n>>    33a6b315ffb461cba32d84ecd1692525a0846f5a tag\trefs/tags/v1.0\n>>    0d3f9dce20e28c6898423eb4a2c2010908e46a6c tag\trefs/tags/v2.0\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}