{"thread":{"id":"10297","subject":"Is there any plan to support partial checkout or submoudule improvement?","startedAt":"2007-10-16T03:20:47Z","lastAt":"2007-10-17T02:54:43Z","messageCount":11,"participants":["franky","Lars Hjemli","Johannes Schindelin","Jan Hudec"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"55935","messageId":"20071016032048.771557E80@mail.kooxoo.com","threadId":"10297","inReplyTo":null,"subject":"Is there any plan to support partial checkout or submoudule improvement?","fromName":"franky","fromEmail":"yinping@kooxoo.com","sentAt":"2007-10-16T03:20:47Z","receivedAt":"2007-10-16T03:20:47Z","isPatch":false,"sender":{"key":"yinping@kooxoo.com","avatar":null},"body":"Here is my pain when using git without partial checkout and submodule\nimprovement.\n\tI want to manage src and compiled bin together consistently. And\nwhen deploying, I don't need the src directory.\n\tMy directory structure is like\n\tProject\n         Src\n         Bin\nFollowing is two schemes I have considered\n1. src, bin as two submoudles\n\tWhen changes are made in src, compiled binaries are put in bin\ndirectory. So when I commit, I have to commit 3 times and write 3 commit\ncomments separately (in Project, src, bin). \n\tI think if some improvement in submodule, this problem can be\navoided. For example, when committing in Project directory, all changes in\nsubmoules are also automatically committed. Maybe a new subcommand\n\"git-submodule commit\" to commit all submodules but share a single comment\nand \"git-commit -A\" to commit both files and submodule?\n\n2. src, bin not submoudle, just sub directory\n\tWhen src changes, compiled binaries are still put in bin directory.\nHowever, only one commit is required. Perfect? No, another problem when\ndeploying. I don't want the src directory to appear in the deployment\ndirectory. However, without partial checkout, I can't do that, since every\ntime bin and src directories are checked out together.\n"},{"id":"55982","messageId":"8c5c35580710160108s4faeaa61k7585d01703c0c8fc@mail.gmail.com","threadId":"10297","inReplyTo":"20071016032048.771557E80@mail.kooxoo.com","subject":"Re: Is there any plan to support partial checkout or submoudule improvement?","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-10-16T08:08:16Z","receivedAt":"2007-10-16T08:08:16Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 10/16/07, franky <yinping@kooxoo.com> wrote:\n> 2. src, bin not submoudle, just sub directory\n>         When src changes, compiled binaries are still put in bin directory.\n> However, only one commit is required. Perfect? No, another problem when\n> deploying. I don't want the src directory to appear in the deployment\n> directory.\n\nIf this is just for deployment of your bin directory, you can try\n\n$ cd Project/bin\n$ git archive --prefix='Project/bin/' HEAD | gzip > Project-x.y.tar.gz\n\n--\nlarsh\n"},{"id":"55985","messageId":"20071016082720.E5EDA7E6F@mail.kooxoo.com","threadId":"10297","inReplyTo":"8c5c35580710160108s4faeaa61k7585d01703c0c8fc@mail.gmail.com","subject":"RE: Is there any plan to support partial checkout or submoudule improvement?","fromName":"franky","fromEmail":"yinping@kooxoo.com","sentAt":"2007-10-16T08:27:19Z","receivedAt":"2007-10-16T08:27:19Z","isPatch":false,"sender":{"key":"yinping@kooxoo.com","avatar":null},"body":"It works. However, I want a single \"git-pull\" to deploy a new version and a\nsingle \"git-reset\" to back to versions before. So I need another resolution.\n\n franky\n\n-----Original Message-----\nFrom: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On Behalf\nOf Lars Hjemli\nSent: Tuesday, October 16, 2007 4:08 PM\nTo: franky\nCc: git@vger.kernel.org\nSubject: Re: Is there any plan to support partial checkout or submoudule\nimprovement?\n\nOn 10/16/07, franky <yinping@kooxoo.com> wrote:\n> 2. src, bin not submoudle, just sub directory\n>         When src changes, compiled binaries are still put in bin\ndirectory.\n> However, only one commit is required. Perfect? No, another problem when\n> deploying. I don't want the src directory to appear in the deployment\n> directory.\n\nIf this is just for deployment of your bin directory, you can try\n\n$ cd Project/bin\n$ git archive --prefix='Project/bin/' HEAD | gzip > Project-x.y.tar.gz\n\n--\nlarsh\n"},{"id":"55987","messageId":"8c5c35580710160142x1f699208gfc226072a27e997a@mail.gmail.com","threadId":"10297","inReplyTo":"20071016082720.E5EDA7E6F@mail.kooxoo.com","subject":"Re: Is there any plan to support partial checkout or submoudule improvement?","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-10-16T08:42:39Z","receivedAt":"2007-10-16T08:42:39Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 10/16/07, franky <yinping@kooxoo.com> wrote:\n> I want a single \"git-pull\" to deploy a new version and a\n> single \"git-reset\" to back to versions before\n\nWell, there is always\n\n$ git archive --remote=<repo> <revspec> <path> | tar -x\n\nThis is effectively a partial checkout of an arbitrary revision from a\nremote repo.\n\n--\nlarsh\n"},{"id":"56001","messageId":"20071016095622.CE14F7E6F@mail.kooxoo.com","threadId":"10297","inReplyTo":"8c5c35580710160142x1f699208gfc226072a27e997a@mail.gmail.com","subject":"RE: Is there any plan to support partial checkout or submoudule improvement?","fromName":"franky","fromEmail":"yinping@kooxoo.com","sentAt":"2007-10-16T09:56:21Z","receivedAt":"2007-10-16T09:56:21Z","isPatch":false,"sender":{"key":"yinping@kooxoo.com","avatar":null},"body":"> Well, there is always\n> \n> $ git archive --remote=<repo> <revspec> <path> | tar -x\n> \n> This is effectively a partial checkout of an arbitrary revision from a\n> remote repo.\n> \n> --\nThat's actually \"a single command\", but a little complex. And there still\nare some problems with this single command\n\n1. each time is full checkout (not incremental), so bad performance for\nlarge bin directory\n2. I can't know deployment version easily and I can't use \"git-log\" to see\nthe log and to decide which version to back to when necessary.\n\nI just find an ugly resolution:\n1. git-clone host:project.git project\nCloned project is as follows (src, bin are subdir instead of submodule)\nproject\n    src\n    bin\n    .git\n\n2. cd project && rm -rf src\n3. when project.git changed, then\n   git-fetch && git-checkout origin/master bin\n\nUnfortulately, it's annoying when I run git-status which complains \"deleted:\nsrc \". And \"git-log\" will not show the newest log since git-checkout doesn't\nupdate the index file\n\nSo, the alternative for the 3rd step is\n\tgit-pull && rm src\n\nIt's so ugly!\n\nSuggestion 1: how about adding a paths option for git-status just like\ngit-diff and git-log\nSuggestion 2: how about changes the default paths for \"git-diff\", \"git-log\"\nand so on from the \"top dir with .git\" to \"the current dir\"? So when I'm in\nbin directory and run \"git-log\", it will only report log or diff in bin\ndirectory.\nfranky\n"},{"id":"56011","messageId":"8c5c35580710160350h53a7b5c4k374067372d4aac1d@mail.gmail.com","threadId":"10297","inReplyTo":"20071016095622.CE14F7E6F@mail.kooxoo.com","subject":"Re: Is there any plan to support partial checkout or submoudule improvement?","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-10-16T10:50:34Z","receivedAt":"2007-10-16T10:50:34Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 10/16/07, franky <yinping@kooxoo.com> wrote:\n> lars said:\n> > $ git archive --remote=<repo> <revspec> <path> | tar -x\n>\n> I can't know deployment version easily\n\nThe <revspec> can be a tag. So you can easily create a wrapper script\nto allow such things as\n\n$ ./deploy.sh v1.2.3\n$ ./deploy.sh HEAD\n$ ./deploy.sh master\n$ ./deploy.sh <sha1>\n\n(note: for this to work with the git:// protocol, git-daemon needs\n--enable=upload-archive)\n\n-- \nlarsh\n"},{"id":"56014","messageId":"Pine.LNX.4.64.0710161158350.25221@racer.site","threadId":"10297","inReplyTo":"20071016082720.E5EDA7E6F@mail.kooxoo.com","subject":"RE: Is there any plan to support partial checkout or submoudule improvement?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-16T11:02:38Z","receivedAt":"2007-10-16T11:02:38Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[please do not top post.  Only keep the parts of the original message that \nyou are responding to, and put your answers just below.  It is a matter of \nsimple economy: it takes you just a couple of minutes, but spares those \n\"millions\" of readers the minutes to understand what you're talking about.  \nIn addition, it is a matter of politeness.]\n\nOn Tue, 16 Oct 2007, franky wrote:\n\n> I want a single \"git-pull\" to deploy a new version and a\n> single \"git-reset\" to back to versions before [on partial checkouts]\n\nYou are talking as if your partial checkout was a project in its own \nright.  Then make it so.  Do not use a partial checkout, but make that a \nsubmodule.\n\nOne reason _not_ to support partial checkouts is exactly to avoid people \nfalling into that mousetrap of thinking that they can sensibly merge \n_parts_ of the HEAD.\n\nCiao,\nDscho\n"},{"id":"56018","messageId":"20071016114601.A66DC7E20@mail.kooxoo.com","threadId":"10297","inReplyTo":"8c5c35580710160350h53a7b5c4k374067372d4aac1d@mail.gmail.com","subject":"RE: Is there any plan to support partial checkout or submoudule improvement?","fromName":"franky","fromEmail":"yinping@kooxoo.com","sentAt":"2007-10-16T11:45:59Z","receivedAt":"2007-10-16T11:45:59Z","isPatch":false,"sender":{"key":"yinping@kooxoo.com","avatar":null},"body":"> The <revspec> can be a tag. So you can easily create a wrapper script\n> to allow such things as\n> \n> $ ./deploy.sh v1.2.3\n> $ ./deploy.sh HEAD\n> $ ./deploy.sh master\n> $ ./deploy.sh <sha1>\nBut it is an online services, I must take care, so I prefer the incremental\nupdate to avoid overwriting deployment directory fully each time. Another\nconsideration, Full update also introduces the busy network traffic.\n\nfranky\n"},{"id":"56019","messageId":"20071016115310.5FB957E6D@mail.kooxoo.com","threadId":"10297","inReplyTo":"Pine.LNX.4.64.0710161158350.25221@racer.site","subject":"RE: Is there any plan to support partial checkout or submoudule improvement?","fromName":"franky","fromEmail":"yinping@kooxoo.com","sentAt":"2007-10-16T11:53:08Z","receivedAt":"2007-10-16T11:53:08Z","isPatch":false,"sender":{"key":"yinping@kooxoo.com","avatar":null},"body":"> [please do not top post.  Only keep the parts of the original message that\n> you are responding to, and put your answers just below.  It is a matter of\n> simple economy: it takes you just a couple of minutes, but spares those\n> \"millions\" of readers the minutes to understand what you're talking about.\n> In addition, it is a matter of politeness.]\n\nThanks for the hint, and I have corrected this.\n\n> On Tue, 16 Oct 2007, franky wrote:\n> \n> > I want a single \"git-pull\" to deploy a new version and a\n> > single \"git-reset\" to back to versions before [on partial checkouts]\n> \n> You are talking as if your partial checkout was a project in its own\n> right.  Then make it so.  Do not use a partial checkout, but make that a\n> submodule.\n\nAs I said in the first email, the submodule way suffers from the multiple\ncommit problem: src and bin as two submodules of project, three commits (for\nthe 3 dirs separately) are needed when src directory changes and compiled\nbinaries being put in bin directory. It's annoying to have to give 3 commit\nlogs.\n \nfranky\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"},{"id":"56128","messageId":"20071016213359.GJ26127@efreet.light.src","threadId":"10297","inReplyTo":"20071016115310.5FB957E6D@mail.kooxoo.com","subject":"Re: Is there any plan to support partial checkout or submoudule improvement?","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-10-16T21:33:59Z","receivedAt":"2007-10-16T21:33:59Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Tue, Oct 16, 2007 at 19:53:08 +0800, franky wrote:\n> > You are talking as if your partial checkout was a project in its own\n> > right.  Then make it so.  Do not use a partial checkout, but make that a\n> > submodule.\n> \n> As I said in the first email, the submodule way suffers from the multiple\n> commit problem: src and bin as two submodules of project, three commits (for\n> the 3 dirs separately) are needed when src directory changes and compiled\n> binaries being put in bin directory. It's annoying to have to give 3 commit\n> logs.\n\nThinking about it, it's only two commits -- src can be a submodule, but bin\na normal directory (you can choose not to check out subprojects during\nrepository checkout).\n\nThis has the advantage, that bin, even when src is not checked out, always\nknows what version of src it is based on (it's in the gitlink) and you only\ngive two commit messages.\n\nNow I would actually say that commiting bin independently is better.\nIt allows you to commit sources more often (eg. if you are doing series of\nsmall fixes) and more flexibility for branching (you don't want to merge\nbinaries).\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"},{"id":"56190","messageId":"20071017025446.51ED77E83@mail.kooxoo.com","threadId":"10297","inReplyTo":"20071016213359.GJ26127@efreet.light.src","subject":"RE: Is there any plan to support partial checkout or submouduleimprovement?","fromName":"franky","fromEmail":"yinping@kooxoo.com","sentAt":"2007-10-17T02:54:43Z","receivedAt":"2007-10-17T02:54:43Z","isPatch":false,"sender":{"key":"yinping@kooxoo.com","avatar":null},"body":"\n\n franky\n> -----Original Message-----\n> From: Jan Hudec [mailto:bulb@ucw.cz]\n> Sent: Wednesday, October 17, 2007 5:34 AM\n> To: franky\n> Cc: 'Johannes Schindelin'; 'Lars Hjemli'; git@vger.kernel.org\n> Subject: Re: Is there any plan to support partial checkout or\n> submouduleimprovement?\n> \n> On Tue, Oct 16, 2007 at 19:53:08 +0800, franky wrote:\n> > > You are talking as if your partial checkout was a project in its own\n> > > right.  Then make it so.  Do not use a partial checkout, but make that\na\n> > > submodule.\n> >\n> > As I said in the first email, the submodule way suffers from the\nmultiple\n> > commit problem: src and bin as two submodules of project, three commits\n(for\n> > the 3 dirs separately) are needed when src directory changes and\ncompiled\n> > binaries being put in bin directory. It's annoying to have to give 3\ncommit\n> > logs.\n> \n> Thinking about it, it's only two commits -- src can be a submodule, but\nbin\n> a normal directory (you can choose not to check out subprojects during\n> repository checkout).\n> Now I would actually say that commiting bin independently is better.\n> It allows you to commit sources more often (eg. if you are doing series of\n> small fixes) and more flexibility for branching (you don't want to merge\n> binaries).\n> \n\nThanks for the advice. It's a good idea.\n> --\n> \t\t\t\t\t\t Jan 'Bulb' Hudec\n<bulb@ucw.cz>\n"}]}