{"thread":{"id":"5677","subject":"[CFH] Remotes conversion script","startedAt":"2006-09-24T21:21:42Z","lastAt":"2006-09-24T23:50:53Z","messageCount":14,"participants":["Petr Baudis","Jakub Narebski","Johannes Schindelin","Santi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"27581","messageId":"20060924212142.GB20017@pasky.or.cz","threadId":"5677","inReplyTo":null,"subject":"[CFH] Remotes conversion script","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-24T21:21:42Z","receivedAt":"2006-09-24T21:21:42Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"  Hi,\n\n  if someone is currently bored, it would be very nice to have a\nconversion script for converting remotes/ to [remote] .config sections\n(unless I missed it and someone already did such a great thing).\n\n  I think about supporting just the [remote] sections in Cogito since\nthey are much easier to handle than the remotes/ file format, but in\norder to maintain reasonable degree of compatibility with current\nrepositories (even freshly cloned since git-clone still generates those\nhorrible things ;-) ) such a script would be a must... and since this is\nnot interesting strictly for Cogito only, I hoped that perhaps some core\nGit people would be interested to help here.\n\n  PS: It would be nice if Git, when writing remote records during clone,\nwould note \"this is supposed to just cover all the remote branches\".\nWhile Git does not support it now, in cg-fetch I would like to support\nautomatically picking up new branches in case you cloned all the\nbranches initially, but I need to distinguish the case when you are\ninterested in just a fixed set of those. BTW, I want to also remove gone\nbranches, but in line with the Git paranoia I'll just move the refs to\nrefs/remotes/*/.attic/ and let the user shoot at will.\n\n  Thanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"27582","messageId":"ef6tt8$2un$1@sea.gmane.org","threadId":"5677","inReplyTo":"20060924212142.GB20017@pasky.or.cz","subject":"Re: [CFH] Remotes conversion script","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-24T21:39:01Z","receivedAt":"2006-09-24T21:39:01Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Petr Baudis wrote:\n\n>   if someone is currently bored, it would be very nice to have a\n> conversion script for converting remotes/ to [remote] .config sections\n> (unless I missed it and someone already did such a great thing).\n> \n>   I think about supporting just the [remote] sections in Cogito since\n> they are much easier to handle than the remotes/ file format, but in\n> order to maintain reasonable degree of compatibility with current\n> repositories (even freshly cloned since git-clone still generates those\n> horrible things ;-) ) such a script would be a must... and since this is\n> not interesting strictly for Cogito only, I hoped that perhaps some core\n> Git people would be interested to help here.\n\nIf I remember correctly currently only some functionality provided by\nremotes file can be provided by [remote] and [branch] sections of git\nconfig.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27584","messageId":"Pine.LNX.4.63.0609242345180.25371@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5677","inReplyTo":"20060924212142.GB20017@pasky.or.cz","subject":"Re: [CFH] Remotes conversion script","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-09-24T21:46:52Z","receivedAt":"2006-09-24T21:46:52Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 24 Sep 2006, Petr Baudis wrote:\n\n>   if someone is currently bored, it would be very nice to have a\n> conversion script for converting remotes/ to [remote] .config sections\n> (unless I missed it and someone already did such a great thing).\n\ncontrib/remotes2config.sh. Since May 3rd.\n\nHth,\nDscho\n"},{"id":"27585","messageId":"Pine.LNX.4.63.0609242347090.25371@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5677","inReplyTo":"ef6tt8$2un$1@sea.gmane.org","subject":"Re: [CFH] Remotes conversion script","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-09-24T21:49:16Z","receivedAt":"2006-09-24T21:49:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 24 Sep 2006, Jakub Narebski wrote:\n\n> If I remember correctly currently only some functionality provided by\n> remotes file can be provided by [remote] and [branch] sections of git\n> config.\n\n... and what might the lacking functionality be?\n\n.git/remotes/<name>    config\n\nURL:                   remote.<name>.url\nPull:                  remote.<name>.fetch\nPush:                  remote.<name>.push\n\nYou can even have multiple entries in the config, and it behaves as if you \nhad multiple lines in .git/remotes/<name>.\n\nCiao,\nDscho\n"},{"id":"27587","messageId":"20060924221644.GE13132@pasky.or.cz","threadId":"5677","inReplyTo":"8aa486160609241457u40fffdd8h298e44351749bb29@mail.gmail.com","subject":"Re: [CFH] Remotes conversion script","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2006-09-24T22:16:44Z","receivedAt":"2006-09-24T22:16:44Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sun, Sep 24, 2006 at 11:57:34PM CEST, I got a letter\nwhere Santi <sbejar@gmail.com> said that...\n> 2006/9/24, Petr Baudis <pasky@suse.cz>:\n> >  I think about supporting just the [remote] sections in Cogito since\n> >they are much easier to handle than the remotes/ file format,\n> \n> What about branches/ files?\n\nI don't know yet. Cogito will certainly *recognize* them for *long* time\nahead (many months to be sure), no matter what will we decide to do with\nthem. Of course Cogito would start being growingly critical about them.\n\nBut the best technical solution is probably to stop using remote\nbranches in the heads namespace in new repositories altogether and\nstrictly create a new [remote] per each repository you fetch from (no\nmatter if it's a single branch or all of them or just a set), and there\nwill be cg-remote-add and perhaps cg-remote-chg to help you maintain\nthat easily.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"27589","messageId":"8aa486160609241534yc78b194g64038fe22048c443@mail.gmail.com","threadId":"5677","inReplyTo":"20060924221644.GE13132@pasky.or.cz","subject":"Re: [CFH] Remotes conversion script","fromName":"Santi","fromEmail":"sbejar@gmail.com","sentAt":"2006-09-24T22:34:24Z","receivedAt":"2006-09-24T22:34:24Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"2006/9/25, Petr Baudis <pasky@ucw.cz>:\n> Dear diary, on Sun, Sep 24, 2006 at 11:57:34PM CEST, I got a letter\n> where Santi <sbejar@gmail.com> said that...\n> > 2006/9/24, Petr Baudis <pasky@suse.cz>:\n> > >  I think about supporting just the [remote] sections in Cogito since\n> > >they are much easier to handle than the remotes/ file format,\n> >\n> > What about branches/ files?\n>\n> I don't know yet. Cogito will certainly *recognize* them for *long* time\n> ahead (many months to be sure), no matter what will we decide to do with\n> them. Of course Cogito would start being growingly critical about them.\n>\n\nIt could be I'm wrong (for sure, I miss something), but I see the\nbranches/ files like [remote] sections files with just one fetch:\n\n.git/branches/git:\ngit://...../git.gi\n\nwould be:\n\n[remote \"git\"]\nurl=git://...../git.git\nfetch=refs/heads/master:refs/heads/git\n\nyou could have a wrapper around repo-config to \"support\" only the\n[remote]  sections.\n\n  Santi\n"},{"id":"27591","messageId":"20060924224017.GC20017@pasky.or.cz","threadId":"5677","inReplyTo":"8aa486160609241534yc78b194g64038fe22048c443@mail.gmail.com","subject":"Re: [CFH] Remotes conversion script","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-24T22:40:17Z","receivedAt":"2006-09-24T22:40:17Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Sep 25, 2006 at 12:34:24AM CEST, I got a letter\nwhere Santi <sbejar@gmail.com> said that...\n> It could be I'm wrong (for sure, I miss something), but I see the\n> branches/ files like [remote] sections files with just one fetch:\n> \n> .git/branches/git:\n> git://...../git.gi\n> \n> would be:\n> \n> [remote \"git\"]\n> url=git://...../git.git\n> fetch=refs/heads/master:refs/heads/git\n\nThat's basically right, the point is that with moving to remotes\nsupport, we will make each remote live in its own separate namespace,\nso when creating new remote branch, it won't live as refs/heads/git\nbut as refs/remotes/git/master (referencing to it as 'git' will still\nwork as long as you won't have a local 'git' branch, in which case\nyou will have to use 'remotes/git'). Cogito will certainly still have\nto support using the old setup, but it will not support creating it\nanymore.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"27594","messageId":"ef72h1$dk9$1@sea.gmane.org","threadId":"5677","inReplyTo":"Pine.LNX.4.63.0609242347090.25371@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [CFH] Remotes conversion script","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-24T22:57:51Z","receivedAt":"2006-09-24T22:57:51Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Johannes Schindelin wrote:\n\n> On Sun, 24 Sep 2006, Jakub Narebski wrote:\n> \n>> If I remember correctly currently only some functionality provided by\n>> remotes file can be provided by [remote] and [branch] sections of git\n>> config.\n> \n> ... and what might the lacking functionality be?\n> \n> .git/remotes/<name>    config\n> \n> URL:                   remote.<name>.url\n> Pull:                  remote.<name>.fetch\n> Push:                  remote.<name>.push\n> \n> You can even have multiple entries in the config, and it behaves as if you \n> had multiple lines in .git/remotes/<name>.\n\nHmmm... strange, in 'next' branch.<name>.* are documented in\nDocumentation/config.txt, but the remote.<name>.* are not.\n\nNeither is documented [branch \"funky name\"] syntax (branch.\"funky name\").\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27596","messageId":"ef72ts$dk9$2@sea.gmane.org","threadId":"5677","inReplyTo":"20060924224017.GC20017@pasky.or.cz","subject":"Re: [CFH] Remotes conversion script","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-24T23:04:41Z","receivedAt":"2006-09-24T23:04:41Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Petr Baudis wrote:\n\n> Dear diary, on Mon, Sep 25, 2006 at 12:34:24AM CEST, I got a letter\n> where Santi <sbejar@gmail.com> said that...\n>> It could be I'm wrong (for sure, I miss something), but I see the\n>> branches/ files like [remote] sections files with just one fetch:\n>> \n>> .git/branches/git:\n>> git://...../git.gi\n>> \n>> would be:\n>> \n>> [remote \"git\"]\n>> url=git://...../git.git\n>> fetch=refs/heads/master:refs/heads/git\n> \n> That's basically right, the point is that with moving to remotes\n> support, we will make each remote live in its own separate namespace,\n\nWhich is overkill if we fetch only from one directory. Besides using\nseparate remotes (hmmm, we should add support for refs/remotes/ in gitweb)\nis a policy decision.\n\nOn somewhat unrelated issue: should git-clone create [remote] section\n(and perhaps [branch] sections) instead of remotes file?\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27597","messageId":"ef730t$dk9$3@sea.gmane.org","threadId":"5677","inReplyTo":"Pine.LNX.4.63.0609242347090.25371@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [CFH] Remotes conversion script","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-24T23:06:19Z","receivedAt":"2006-09-24T23:06:19Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Johannes Schindelin wrote:\n\n> On Sun, 24 Sep 2006, Jakub Narebski wrote:\n> \n>> If I remember correctly currently only some functionality provided by\n>> remotes file can be provided by [remote] and [branch] sections of git\n>> config.\n> \n> ... and what might the lacking functionality be?\n\nWhat about\n        Pull: +refs/heads/pu:refs/heads/pu\nfunctionality, i.e. allowing force-update (non fast-forward) fetches?\n\n> .git/remotes/<name>    config\n> \n> URL:                   remote.<name>.url\n> Pull:                  remote.<name>.fetch\n> Push:                  remote.<name>.push\n> \n> You can even have multiple entries in the config, and it behaves as if you \n> had multiple lines in .git/remotes/<name>.\n\nAnd first pull line is default branch to merge, all the rest is marked\nas not-for-merge?\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27598","messageId":"20060924231108.GE20017@pasky.or.cz","threadId":"5677","inReplyTo":"ef72ts$dk9$2@sea.gmane.org","subject":"Re: [CFH] Remotes conversion script","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-24T23:11:08Z","receivedAt":"2006-09-24T23:11:08Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Sep 25, 2006 at 01:04:41AM CEST, I got a letter\nwhere Jakub Narebski <jnareb@gmail.com> said that...\n> Petr Baudis wrote:\n> \n> > Dear diary, on Mon, Sep 25, 2006 at 12:34:24AM CEST, I got a letter\n> > where Santi <sbejar@gmail.com> said that...\n> >> It could be I'm wrong (for sure, I miss something), but I see the\n> >> branches/ files like [remote] sections files with just one fetch:\n> >> \n> >> .git/branches/git:\n> >> git://...../git.gi\n> >> \n> >> would be:\n> >> \n> >> [remote \"git\"]\n> >> url=git://...../git.git\n> >> fetch=refs/heads/master:refs/heads/git\n> > \n> > That's basically right, the point is that with moving to remotes\n> > support, we will make each remote live in its own separate namespace,\n> \n> Which is overkill if we fetch only from one directory.\n\nWhy?\n\n> Besides using separate remotes (hmmm, we should add support for\n> refs/remotes/ in gitweb) is a policy decision.\n\nCogito's designed so that users don't have to _care_ about the policy at\nthis level and it will just magically work for them, sensibly. If you\ncare enough, you can just modify the config file manually.\n\n> On somewhat unrelated issue: should git-clone create [remote] section\n> (and perhaps [branch] sections) instead of remotes file?\n\nIdeally, I would hope for .git/remotes/ to be officially deprecated...\n(perhaps after the next release?)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"},{"id":"27599","messageId":"8aa486160609241618w32501999rc7dcec1d16db440e@mail.gmail.com","threadId":"5677","inReplyTo":"ef730t$dk9$3@sea.gmane.org","subject":"Re: [CFH] Remotes conversion script","fromName":"Santi","fromEmail":"sbejar@gmail.com","sentAt":"2006-09-24T23:18:10Z","receivedAt":"2006-09-24T23:18:10Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"2006/9/25, Jakub Narebski <jnareb@gmail.com>:\n> Johannes Schindelin wrote:\n>\n> > On Sun, 24 Sep 2006, Jakub Narebski wrote:\n> >\n> >> If I remember correctly currently only some functionality provided by\n> >> remotes file can be provided by [remote] and [branch] sections of git\n> >> config.\n> >\n> > ... and what might the lacking functionality be?\n>\n> What about\n>         Pull: +refs/heads/pu:refs/heads/pu\n> functionality, i.e. allowing force-update (non fast-forward) fetches?\n\n[remote \"git\"]\nurl = git://.../git.git\nfetch = +refs/heads/pu:refs/heads/pu\n\n>\n> > .git/remotes/<name>    config\n> >\n> > URL:                   remote.<name>.url\n> > Pull:                  remote.<name>.fetch\n> > Push:                  remote.<name>.push\n> >\n> > You can even have multiple entries in the config, and it behaves as if you\n> > had multiple lines in .git/remotes/<name>.\n>\n> And first pull line is default branch to merge, all the rest is marked\n> as not-for-merge?\n\nThe same way as with .git/remotes/.\n\nthe .git/remotes/ files and the [remote] sections are equivalent, modulo bugs.\n\n   Santi\n"},{"id":"27602","messageId":"ef750s$jg4$1@sea.gmane.org","threadId":"5677","inReplyTo":"20060924231108.GE20017@pasky.or.cz","subject":"Re: [CFH] Remotes conversion script","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-24T23:40:26Z","receivedAt":"2006-09-24T23:40:26Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Petr Baudis wrote:\n\n> Dear diary, on Mon, Sep 25, 2006 at 01:04:41AM CEST, I got a letter\n> where Jakub Narebski <jnareb@gmail.com> said that...\n>> Petr Baudis wrote:\n>> \n>> > Dear diary, on Mon, Sep 25, 2006 at 12:34:24AM CEST, I got a letter\n>> > where Santi <sbejar@gmail.com> said that...\n>> >> It could be I'm wrong (for sure, I miss something), but I see the\n>> >> branches/ files like [remote] sections files with just one fetch:\n>> >> \n>> >> .git/branches/git:\n>> >> git://...../git.gi\n>> >> \n>> >> would be:\n>> >> \n>> >> [remote \"git\"]\n>> >> url=git://...../git.git\n>> >> fetch=refs/heads/master:refs/heads/git\n>> > \n>> > That's basically right, the point is that with moving to remotes\n>> > support, we will make each remote live in its own separate namespace,\n>> \n>> Which is overkill if we fetch only from one directory.\n> \n> Why?\n\ns/directory/repository/ of course. And as of why: I'd rather have 'next',\n'maint, 'html', 'man' in main namespace (with 'origin' substituting\n'master') instead of remotes/origin/next etc.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"27603","messageId":"20060924235053.GF20017@pasky.or.cz","threadId":"5677","inReplyTo":"ef750s$jg4$1@sea.gmane.org","subject":"Re: [CFH] Remotes conversion script","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-09-24T23:50:53Z","receivedAt":"2006-09-24T23:50:53Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Sep 25, 2006 at 01:40:26AM CEST, I got a letter\nwhere Jakub Narebski <jnareb@gmail.com> said that...\n> s/directory/repository/ of course. And as of why: I'd rather have 'next',\n> 'maint, 'html', 'man' in main namespace (with 'origin' substituting\n> 'master') instead of remotes/origin/next etc.\n\nWell, I don't know. Cogito should stay simple (and stupid) and if you\nintroduce too much choice, you will lose that. Especially if the choice\nis in something already so confusing as branching. And for larger\nrepositories or more complex distributed branching situations, the\nseparated-remotes model is clearly superior, so I'd rather keep it for\nthe simpler cases as well, since if it introduces any hassle, I believe\nit's only very minor (and pays off in the long run for the simpler\nsetups as well, I believe).\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\nlK[d2%Sa2/d0$^Ixp\"|dc`;s/\\W//g;$_=pack('H*',/((..)*)$/)\n"}]}