{"thread":{"id":"15968","subject":"Re: [PATCH v2] Add command line option --chdir/-C to allow setting git process work directory.","startedAt":"2008-10-19T23:13:49Z","lastAt":"2011-09-24T06:57:47Z","messageCount":2,"participants":["Maciej Pasternacki","kimi"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"93444","messageId":"4BBD811A-F750-43F5-A0F0-EBB186E54AEE@pasternacki.net","threadId":"15968","inReplyTo":"0B4A1BD5-5FC3-4B29-B0BB-77A85AEDF5B2@pasternacki.net","subject":"Re: [PATCH v2] Add command line option --chdir/-C to allow setting git process work directory.","fromName":"Maciej Pasternacki","fromEmail":"maciej@pasternacki.net","sentAt":"2008-10-19T23:13:49Z","receivedAt":"2008-10-19T23:13:49Z","isPatch":true,"sender":{"key":"maciej@pasternacki.net","avatar":"https://gravatar.com/avatar/6485c5851d08fb9492fd6b9528e10b730c82320a0665560401c417a5f9209773?d=mp&s=160"},"body":"On 2008-10-19, at 23:02, Jeff King wrote:\n\n> I took a closer look at this. I'm not sure that there is actually a\n> problem with moving the cd_to_toplevel before require_work_tree.\n> cd_to_toplevel makes sure there is actually something to cdup to. In  \n> my\n> test without a work-tree, \"git rev-parse --show-cdup\" simply printed\n> nothing, causing no \"cd\" to occur.\n\nI won't speculate on whether moving cd_to_toplevel up will introduce  \nproblem or not.  I am not familiar with git internals, and I just  \nrepeat an opinion gathered on #git.  However, -C seem to be better  \nsuited for simple cases, conceptually cleaner, and may make the  \nlearning curve a bit less steep.  There is no need for consdering all  \npossible --work-tree/--git-dir combinations and their implications, it  \nis possible just to say \"cd there, and act as usual\".\n\n> So:\n>\n> 1. I think we can fix this breakage by swapping the two.\n\nI can prepare a patch if that's expected, but probably I won't  \nunderstand what it exactly does and what are implications of this  \nchange.\n\n> 2. There is still breakage in other scripts, some of which may need\n>    quite in-depth fixes (e.g., git-bisect requires a work tree but\n>    does not chdir at all. For the require_work_tree test to work, it\n>    needs to be inside the work tree, and the script will need a\n>    careful looking over to see what ramifications that has).\n\nI really don't think I'm competent enough to fix more complex cases  \nwithout breaking twice as many things; I don't feel confident even  \nwith a simple swap in git-pull at the moment\n\n> 3. I think your -C option has some merit independent of this, since\n>    it allows you to chdir and still use the usual lookup rules (e.g.,\n>    see if it is bare vs a regular repository). But I don't feel\n>    strongly about it one way or the other.\n\nIn my use case, it definitely has merits as it makes git behave  \nexactly as if user himself wrote \"git pull\" inside the work tree, and  \nI am still not sure wheter expected --work-tree/--git-dir combinations  \nwould behave the same.  Probably I'll need to add more commands and  \nmore complex use cases as I develop cl-librarian, and -C would make  \nthis job way easier.\n\nRegards,\nMaciej.\n\n-- \n-><- Maciej Pasternacki -><- http://www.pasternacki.net/ -><-\n"},{"id":"176120","messageId":"1316847467137-6826652.post@n2.nabble.com","threadId":"15968","inReplyTo":"4BBD811A-F750-43F5-A0F0-EBB186E54AEE@pasternacki.net","subject":"Re: [PATCH v2] Add command line option --chdir/-C to allow setting git process work directory.","fromName":"kimi","fromEmail":"owuya@hotmail.com","sentAt":"2011-09-24T06:57:47Z","receivedAt":"2011-09-24T06:57:47Z","isPatch":true,"sender":{"key":"owuya@hotmail.com","avatar":null},"body":"I like  http://www.monclershare.com/ <strong>Moncler</strong> \nI like  http://www.monclershare.com/ <strong>Buy Moncler</strong> \nI like  http://www.monclershare.com/ <strong>Moncler Online</strong> \nI like  http://www.monclershare.com/ <strong>Moncler Jackets</strong> \nI like  http://www.monclershare.com/ <strong>Discount Moncler\nJackets</strong> \n\n--\nView this message in context: http://git.661346.n2.nabble.com/PATCH-v2-Add-command-line-option-chdir-C-to-allow-setting-git-process-work-directory-tp1352126p6826652.html\nSent from the git mailing list archive at Nabble.com.\n"}]}