{"thread":{"id":"956","subject":"Using local trees and cogito","startedAt":"2005-06-16T02:37:59Z","lastAt":"2005-06-17T11:57:28Z","messageCount":3,"participants":["Jon Smirl","Jan Harkes","Matthias Urlichs"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"4983","messageId":"9e473391050615193719d81951@mail.gmail.com","threadId":"956","inReplyTo":null,"subject":"Using local trees and cogito","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2005-06-16T02:37:59Z","receivedAt":"2005-06-16T02:37:59Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"I took Jeff Garzik's scripts for managing multiple trees and reworked\nthem a little for cogito. I changed the names to something that makes\nmore sense to me, but what does everyone think? Or can cogito already\ndo this I just can't figure it out?\n\nIn my terminology forks are different tree heads in the same git tree\n(local branches).\n\ncg-fork fname -- make a new tree head from the current tree and switch to it.\ncg-goto fname -- switch the current working tree to one of the forks.\ncg-goto -- display the name of the current fork\ncg-goto -l -- display the name of all forks\ncg-diff fname -- diff the current working tree to a fork\ncg-merge fname -- merge another fork into the current fork\n\nI fixed goto to not jump if there are pending changes. Is there a\nbetter way to do this?\n\nIs fork a good name since branches refer to other git trees? I'm\nsomewhat confused about exactly what a branch consists of, it looks to\nme like the path to another external tree.\n\nI do find Jeff's work very useful since it allows me to keep twenty\npatches in a single tree and jump between them. This is better than bk\nwhere I had to keep multiple entire trees with a build in each of\nthem. This way I only rebuild the files that changed after a jump.\n\nOne problem I did notice is that if you add file in a fork and jump to\na fork without the file, it doesn't get removed. That's not a big\nproblem but it can be confusing.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"4995","messageId":"20050616163907.GA26037@delft.aura.cs.cmu.edu","threadId":"956","inReplyTo":"9e473391050615193719d81951@mail.gmail.com","subject":"Re: Using local trees and cogito","fromName":"Jan Harkes","fromEmail":"jaharkes@cs.cmu.edu","sentAt":"2005-06-16T16:39:07Z","receivedAt":"2005-06-16T16:39:07Z","isPatch":false,"sender":{"key":"jaharkes@cs.cmu.edu","avatar":"https://gravatar.com/avatar/cf95aecd150ca8ef33d6edc337ac4bb9e13aa4246fc3679257d578c7fddc1633?d=mp&s=160"},"body":"On Wed, Jun 15, 2005 at 10:37:59PM -0400, Jon Smirl wrote:\n> One problem I did notice is that if you add file in a fork and jump to\n> a fork without the file, it doesn't get removed. That's not a big\n> problem but it can be confusing.\n\nI noticed the same thing and 'solved' it the following way,\n\nAfter pointing the head at the new branch, instead of using,\n\n    git-read-tree -m HEAD && checkout-cache -q -f -u -a\n\nI use,\n\n    git-diff-cache -R -p HEAD | git-apply --index\n\nThis simple reverse applies the differences between the previously\nchecked out tree and the branch we just switched to. Ofcourse the\ncache/index has to be up to date before we switch between branches.\n\nJan\n"},{"id":"5001","messageId":"pan.2005.06.17.11.57.23.864424@smurf.noris.de","threadId":"956","inReplyTo":"20050616163907.GA26037@delft.aura.cs.cmu.edu","subject":"Re: Using local trees and cogito","fromName":"Matthias Urlichs","fromEmail":"smurf@smurf.noris.de","sentAt":"2005-06-17T11:57:28Z","receivedAt":"2005-06-17T11:57:28Z","isPatch":false,"sender":{"key":"matthias@urlichs.de","avatar":"https://gravatar.com/avatar/2708905af227313eba6f2b2ae0f7d0259b5ac5d71baef58fe5a13c699ce0bbf0?d=mp&s=160"},"body":"Hi, Jan Harkes wrote:\n\n> I use,\n> \n>     git-diff-cache -R -p HEAD | git-apply --index\n> \n> This simple reverse applies the differences between the previously\n> checked out tree and the branch we just switched to. Ofcourse the\n> cache/index has to be up to date before we switch between branches.\n\n... except that this method fails to create intermediate dirctories.\n\nfatal: unable to create file drivers/media/dvb/dibusb/Kconfig (No such file or directory)\n\nLooks like a bug in git-apply.\n\n-- \nMatthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de\nDisclaimer: The quote was selected randomly. Really. | http://smurf.noris.de\n - -\nLet us endeavor so to live that when we come to die even the undertaker will be\nsorry.\n\t\t-- Mark Twain, \"Pudd'nhead Wilson's Calendar\"\n\n\n"}]}