{"thread":{"id":"13159","subject":"[PATCH 0/8] builtin-clone","startedAt":"2008-04-17T23:32:15Z","lastAt":"2008-04-18T01:14:31Z","messageCount":4,"participants":["Daniel Barkalow","Johan Herland"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"74691","messageId":"alpine.LNX.1.00.0804171923040.19665@iabervon.org","threadId":"13159","inReplyTo":null,"subject":"[PATCH 0/8] builtin-clone","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-04-17T23:32:15Z","receivedAt":"2008-04-17T23:32:15Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"This is my latest version, rebased approximately on current master (or \nrecent maint, I guess). It's missing all of Johan's stuff, which is tests \nfor stuff I've fixed and (after this series) a series to make the clone \ngenerate packed refs. I believe Johannes has a bunch of changes, and I \nhaven't been working on this lately, and it needs review more than \nanything, so I'm sending it out.\n\nDaniel Barkalow (8):\n  Mark the list of refs to fetch as const\n  Add a lockfile function to append to a file\n  Add a library function to add an alternate to the alternates file\n  Add a function to set a non-default work tree\n  Have a constant extern refspec for \"--tags\"\n  Allow for having for_each_ref() list extra refs\n  Provide API access to init_db()\n  Build in clone\n\n Makefile                      |    2 +-\n builtin-clone.c               |  546 +++++++++++++++++++++++++++++++++++++++++\n builtin-fetch.c               |   10 +-\n builtin-init-db.c             |  180 +++++++-------\n builtin.h                     |    1 +\n cache.h                       |    7 +\n contrib/examples/git-clone.sh |  522 +++++++++++++++++++++++++++++++++++++++\n environment.c                 |    6 +\n git-clone.sh                  |  522 ---------------------------------------\n git.c                         |    1 +\n lockfile.c                    |   17 ++\n refs.c                        |   18 ++\n refs.h                        |    9 +\n remote.c                      |    9 +\n remote.h                      |    2 +\n sha1_file.c                   |   12 +\n transport.c                   |   16 +-\n transport.h                   |    4 +-\n 18 files changed, 1256 insertions(+), 628 deletions(-)\n create mode 100644 builtin-clone.c\n create mode 100755 contrib/examples/git-clone.sh\n delete mode 100755 git-clone.sh\n"},{"id":"74703","messageId":"200804180250.48544.johan@herland.net","threadId":"13159","inReplyTo":"alpine.LNX.1.00.0804171923040.19665@iabervon.org","subject":"Re: [PATCH 0/8] builtin-clone","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2008-04-18T00:50:48Z","receivedAt":"2008-04-18T00:50:48Z","isPatch":true,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Friday 18 April 2008, Daniel Barkalow wrote:\n> This is my latest version, rebased approximately on current master (or \n> recent maint, I guess). It's missing all of Johan's stuff, which is tests \n> for stuff I've fixed\n\nDoes this mean you no longer need the tests, or that you want me to resend?\n\n> and (after this series) a series to make the clone generate packed refs.\n\nI'll resend the series once your work has settled down and landed in \"next\".\n\nBTW, I noticed in your repo (at iabervon.org) that you put \"if (0)\" around\nthe code generating packed-refs (using the old one instead), and added the\nfollowing note to the commit message:\n\n  I made this compile-time configurable because I'm not sure we want to\n  pack unconditionally.\n\nWe should probably figure out the right thing to do here. AFAICS,\ncompile-time configurability is only a temporary measure, and we basically\nhave to choose between:\n\n1. Add a command-line option (and config variable?) for controlling\n   whether \"git clone\" generates packed refs.\n\n2. Make \"git clone\" unconditionally generate packed refs.\n\nCurrently, I'm leaning towards (2), since I don't think there's enough\ndrawbacks with generating packed-refs to justify adding a command-line\noption. AFAICS, the only drawback is that reflogs aren't\ncreated/initialized on clone, but I got the feeling that this was not\nparticularly important. Quoting Junio from an earlier thread:\n\n  Not writing reflogs is a _different_ behaviour from the previous, but I\n  suspect it might even be an improvement.  When you have 1000 remote\n  branches, probably most of them are not even active.\n\nIf there are good arguments for going with (1), I'd love to hear them.\n\n\nHave fun, and thanks a lot for your hard work!\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"},{"id":"74704","messageId":"alpine.LNX.1.00.0804172052300.19665@iabervon.org","threadId":"13159","inReplyTo":"200804180250.48544.johan@herland.net","subject":"Re: [PATCH 0/8] builtin-clone","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-04-18T00:56:51Z","receivedAt":"2008-04-18T00:56:51Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Fri, 18 Apr 2008, Johan Herland wrote:\n\n> On Friday 18 April 2008, Daniel Barkalow wrote:\n> > This is my latest version, rebased approximately on current master (or \n> > recent maint, I guess). It's missing all of Johan's stuff, which is tests \n> > for stuff I've fixed\n> \n> Does this mean you no longer need the tests, or that you want me to resend?\n\nI have them, but my patch-sending process isn't set up for sending other \npeople's patches without forging their email, and I wanted to get this \nseries out, and they're not critical, so I skipped them for now.\n\n> > and (after this series) a series to make the clone generate packed refs.\n> \n> I'll resend the series once your work has settled down and landed in \"next\".\n> \n> BTW, I noticed in your repo (at iabervon.org) that you put \"if (0)\" around\n> the code generating packed-refs (using the old one instead), and added the\n> following note to the commit message:\n\nIt was really mostly that the version I have in there doesn't pass the \ntests, due to not having the thing to filter packed refs.\n\n>   I made this compile-time configurable because I'm not sure we want to\n>   pack unconditionally.\n> \n> We should probably figure out the right thing to do here. AFAICS,\n> compile-time configurability is only a temporary measure, and we basically\n> have to choose between:\n> \n> 1. Add a command-line option (and config variable?) for controlling\n>    whether \"git clone\" generates packed refs.\n> \n> 2. Make \"git clone\" unconditionally generate packed refs.\n> \n> Currently, I'm leaning towards (2), since I don't think there's enough\n> drawbacks with generating packed-refs to justify adding a command-line\n> option. AFAICS, the only drawback is that reflogs aren't\n> created/initialized on clone, but I got the feeling that this was not\n> particularly important. Quoting Junio from an earlier thread:\n> \n>   Not writing reflogs is a _different_ behaviour from the previous, but I\n>   suspect it might even be an improvement.  When you have 1000 remote\n>   branches, probably most of them are not even active.\n> \n> If there are good arguments for going with (1), I'd love to hear them.\n\nI think it's fine, actually (now that you've not test corrections that \nwork for it); but I'd like to have builtin-clone land without any changes \nin behaviour, and then get this sort of improvement.\n\n\t-Daniel\n*This .sig left intentionally blank*"},{"id":"74705","messageId":"200804180314.31659.johan@herland.net","threadId":"13159","inReplyTo":"alpine.LNX.1.00.0804172052300.19665@iabervon.org","subject":"Re: [PATCH 0/8] builtin-clone","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2008-04-18T01:14:31Z","receivedAt":"2008-04-18T01:14:31Z","isPatch":true,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Friday 18 April 2008, Daniel Barkalow wrote:\n> On Fri, 18 Apr 2008, Johan Herland wrote:\n> > On Friday 18 April 2008, Daniel Barkalow wrote:\n> > > This is my latest version, rebased approximately on current master (or \n> > > recent maint, I guess). It's missing all of Johan's stuff, which is tests \n> > > for stuff I've fixed\n> > \n> > Does this mean you no longer need the tests, or that you want me to resend?\n> \n> I have them, but my patch-sending process isn't set up for sending other \n> people's patches without forging their email, and I wanted to get this \n> series out, and they're not critical, so I skipped them for now.\n\nNo problem. Feel free to do whatever you like with them. :)\n\n> > 1. Add a command-line option (and config variable?) for controlling\n> >    whether \"git clone\" generates packed refs.\n> > \n> > 2. Make \"git clone\" unconditionally generate packed refs.\n> > \n> > Currently, I'm leaning towards (2), [...]\n> > \n> > If there are good arguments for going with (1), I'd love to hear them.\n> \n> I think it's fine, actually (now that you've not test corrections that \n> work for it); but I'd like to have builtin-clone land without any changes \n> in behaviour, and then get this sort of improvement.\n\nYes, I agree that a pure rewrite (without changes in behaviour) should be\ncommitted first.\n\n\nHave fun :)\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"}]}