{"thread":{"id":"24183","subject":"on pulling/cloning git notes","startedAt":"2010-06-24T08:22:21Z","lastAt":"2010-06-24T13:27:48Z","messageCount":5,"participants":["Christian MICHON","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"144124","messageId":"AANLkTilDMVU6b7SwHx0Bztu1rTCubiIPTuDDX6pJBcHx@mail.gmail.com","threadId":"24183","inReplyTo":null,"subject":"on pulling/cloning git notes","fromName":"Christian MICHON","fromEmail":"christian.michon@gmail.com","sentAt":"2010-06-24T08:22:21Z","receivedAt":"2010-06-24T08:22:21Z","isPatch":false,"sender":{"key":"christian.michon@gmail.com","avatar":"https://gravatar.com/avatar/8a7c327b21187fbcab5c27640a49450eec72e0355dc292501197f27a5a744ec4?d=mp&s=160"},"body":"Hi list,\n\nI've been playing recently with git notes and figured out how to push\nmy notes to my central gitolite server, tweaking .git/config in this\nway (adding a push section):\n\n[remote \"gitolite\"]\n        url = gitolite:daat\n        fetch = +refs/heads/*:refs/remotes/gitolite/*\n        push = +refs/notes/*:refs/notes/*\n\nWhen trying to to a 'git clone --mirror' from that same gitolite\nserver, I was expecting to get back refs/notes, but I did not.\n\nDid I miss something or git notes are actually not meant to be cloned/pulled?\n\n-- \nChristian\n--\nhttp://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside !\n"},{"id":"144126","messageId":"4C2329E5.8050904@drmicha.warpmail.net","threadId":"24183","inReplyTo":"AANLkTilDMVU6b7SwHx0Bztu1rTCubiIPTuDDX6pJBcHx@mail.gmail.com","subject":"Re: on pulling/cloning git notes","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-06-24T09:48:21Z","receivedAt":"2010-06-24T09:48:21Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Christian MICHON venit, vidit, dixit 24.06.2010 10:22:\n> Hi list,\n> \n> I've been playing recently with git notes and figured out how to push\n> my notes to my central gitolite server, tweaking .git/config in this\n> way (adding a push section):\n> \n> [remote \"gitolite\"]\n>         url = gitolite:daat\n>         fetch = +refs/heads/*:refs/remotes/gitolite/*\n>         push = +refs/notes/*:refs/notes/*\n> \n> When trying to to a 'git clone --mirror' from that same gitolite\n> server, I was expecting to get back refs/notes, but I did not.\n> \n> Did I miss something or git notes are actually not meant to be cloned/pulled?\n> \n\nAs you can see from the default \"fetch\" line above, \"refs/heads\" are\nfetched by default (when cloning, fetching etc.), but nothing else\n(well, besides some tags). You can set up an additional fetch refspec to\nget the notes also.\n\nIt's not done by default because it's up to you decide what to do with\nthe notes. Sometimes, you want them to end up in \"refs/notes\" so that\nthey are displayed by default. But maybe you want them in\n\"refs/notes/remotes/gitolites\" e.g. and display them only on request\n(--show-notes=remotes/gitolite), or merge them into your own notes.\n\nMichael\n"},{"id":"144145","messageId":"AANLkTilGS6t29J4NQMgseZY9WD1kAPCr9oFeQt1RaWjP@mail.gmail.com","threadId":"24183","inReplyTo":"4C2329E5.8050904@drmicha.warpmail.net","subject":"Re: on pulling/cloning git notes","fromName":"Christian MICHON","fromEmail":"christian.michon@gmail.com","sentAt":"2010-06-24T12:25:13Z","receivedAt":"2010-06-24T12:25:13Z","isPatch":false,"sender":{"key":"christian.michon@gmail.com","avatar":"https://gravatar.com/avatar/8a7c327b21187fbcab5c27640a49450eec72e0355dc292501197f27a5a744ec4?d=mp&s=160"},"body":"On Thu, Jun 24, 2010 at 11:48 AM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> As you can see from the default \"fetch\" line above, \"refs/heads\" are\n> fetched by default (when cloning, fetching etc.), but nothing else\n> (well, besides some tags). You can set up an additional fetch refspec to\n> get the notes also.\n\nI'm actually doing a fresh clone elsewhere, using 'git clone --mirror\ngitolite:daat'.\n\nI was expecting to grab everything from the remote refs, as in this\ncase my .git/config will look like this:\n[remote \"origin\"]\n        fetch = +refs/*:refs/*\n        mirror = true\n        url = gitolite:daat\n\n> It's not done by default because it's up to you decide what to do with\n> the notes. Sometimes, you want them to end up in \"refs/notes\" so that\n> they are displayed by default. But maybe you want them in\n> \"refs/notes/remotes/gitolites\" e.g. and display them only on request\n> (--show-notes=remotes/gitolite), or merge them into your own notes.\n>\n\nSo the * in .git/config was misleading me. Instead I changed the fetch\nto this after the original clone, then performed an incremental fetch\nand it worked.\n\n[remote \"origin\"]\n        fetch = +refs/heads/*:refs/notes/*\n        mirror = true\n        url = gitolite:daat\n\nThanks for the hint, Michael!\n\n-- \nChristian\n--\nhttp://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside !\n"},{"id":"144150","messageId":"4C235ABE.9050504@drmicha.warpmail.net","threadId":"24183","inReplyTo":"AANLkTilGS6t29J4NQMgseZY9WD1kAPCr9oFeQt1RaWjP@mail.gmail.com","subject":"Re: on pulling/cloning git notes","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-06-24T13:16:46Z","receivedAt":"2010-06-24T13:16:46Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Christian MICHON venit, vidit, dixit 24.06.2010 14:25:\n> On Thu, Jun 24, 2010 at 11:48 AM, Michael J Gruber\n> <git@drmicha.warpmail.net> wrote:\n>> As you can see from the default \"fetch\" line above, \"refs/heads\" are\n>> fetched by default (when cloning, fetching etc.), but nothing else\n>> (well, besides some tags). You can set up an additional fetch refspec to\n>> get the notes also.\n> \n> I'm actually doing a fresh clone elsewhere, using 'git clone --mirror\n> gitolite:daat'.\n\nYou didn't say \"--mirror\" before ;)\n\n> \n> I was expecting to grab everything from the remote refs, as in this\n> case my .git/config will look like this:\n> [remote \"origin\"]\n>         fetch = +refs/*:refs/*\n>         mirror = true\n>         url = gitolite:daat\n\nHmmh. I have notes in the standard \"refs/notes/commits\", push them into\nthat same ref on the remote side (using an additional push refspec).\nWhen I \"clone --mirror\" that I do get them back in \"refs/notes/commits\"\nin the (bare) mirror repo.\n\n> [remote \"origin\"]\n>         fetch = +refs/heads/*:refs/notes/*\n>         mirror = true\n>         url = gitolite:daat\n> \n> Thanks for the hint, Michael!\n> \n\nI'm glad it helped though I don't know why...\n\nDid you push the notes into head refs?\n\nComparing the output of\n\ngit ls-remote gitolite:daat\n\nto that of \"git show-ref\" in you local repos (the original one and the\nmirror) may clear things up quite a bit.\n\nCheers,\nMichael\n"},{"id":"144151","messageId":"AANLkTimImotT2F2JGSZnUsjD-dGk7s_eBx2j815FTcAG@mail.gmail.com","threadId":"24183","inReplyTo":"4C235ABE.9050504@drmicha.warpmail.net","subject":"Re: on pulling/cloning git notes","fromName":"Christian MICHON","fromEmail":"christian.michon@gmail.com","sentAt":"2010-06-24T13:27:48Z","receivedAt":"2010-06-24T13:27:48Z","isPatch":false,"sender":{"key":"christian.michon@gmail.com","avatar":"https://gravatar.com/avatar/8a7c327b21187fbcab5c27640a49450eec72e0355dc292501197f27a5a744ec4?d=mp&s=160"},"body":"On Thu, Jun 24, 2010 at 3:16 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> Christian MICHON venit, vidit, dixit 24.06.2010 14:25:\n>> On Thu, Jun 24, 2010 at 11:48 AM, Michael J Gruber\n>> <git@drmicha.warpmail.net> wrote:\n>>> As you can see from the default \"fetch\" line above, \"refs/heads\" are\n>>> fetched by default (when cloning, fetching etc.), but nothing else\n>>> (well, besides some tags). You can set up an additional fetch refspec to\n>>> get the notes also.\n>>\n>> I'm actually doing a fresh clone elsewhere, using 'git clone --mirror\n>> gitolite:daat'.\n>\n> You didn't say \"--mirror\" before ;)\n\nyes I did... \"When trying to to a 'git clone --mirror' from that same\ngitolite\"...\n\n>\n>>\n>> I was expecting to grab everything from the remote refs, as in this\n>> case my .git/config will look like this:\n>> [remote \"origin\"]\n>>         fetch = +refs/*:refs/*\n>>         mirror = true\n>>         url = gitolite:daat\n>\n> Hmmh. I have notes in the standard \"refs/notes/commits\", push them into\n> that same ref on the remote side (using an additional push refspec).\n> When I \"clone --mirror\" that I do get them back in \"refs/notes/commits\"\n> in the (bare) mirror repo.\n>\n>> [remote \"origin\"]\n>>         fetch = +refs/heads/*:refs/notes/*\n>>         mirror = true\n>>         url = gitolite:daat\n>>\n>> Thanks for the hint, Michael!\n>>\n>\n> I'm glad it helped though I don't know why...\n>\n> Did you push the notes into head refs?\n\nyes apparently I did. I thought it did help, I must have pushed the\nwrong way originally.\n\nI'll fix that. Actually --mirror works fine and I'm actually getting\nthe commit linked to the notes.\n\nthanks for double checking.\n\n-- \nChristian\n--\nhttp://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside !\n"}]}