{"thread":{"id":"4565","subject":"simple use case scenario for --read-tree and --write-tree with --prefix option","startedAt":"2006-06-19T07:28:00Z","lastAt":"2006-06-19T15:50:08Z","messageCount":5,"participants":["Aneesh Kumar","Junio C Hamano","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"22053","messageId":"cc723f590606190028t65c76c74t6a90d1dcec411598@mail.gmail.com","threadId":"4565","inReplyTo":null,"subject":"simple use case scenario for --read-tree and --write-tree with --prefix option","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-06-19T07:28:00Z","receivedAt":"2006-06-19T07:28:00Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"Hi all,\n\nI searched the archives but didn't find anything. If i understand\ncorrectly the sub project idea is using the gitlink object type. So\nwhat is read-tree and write-tree with --prefix option supposed to\nachieve.\n\n-aneesh\n"},{"id":"22055","messageId":"7vpsh5a8gs.fsf@assigned-by-dhcp.cox.net","threadId":"4565","inReplyTo":"cc723f590606190028t65c76c74t6a90d1dcec411598@mail.gmail.com","subject":"Re: simple use case scenario for --read-tree and --write-tree with --prefix option","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-19T07:52:03Z","receivedAt":"2006-06-19T07:52:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Aneesh Kumar\" <aneesh.kumar@gmail.com> writes:\n\n> I searched the archives but didn't find anything. If i understand\n> correctly the sub project idea is using the gitlink object type. So\n> what is read-tree and write-tree with --prefix option supposed to\n> achieve.\n\nThe --prefix option to read-tree was very useful when I did a\nhand merge of gitweb for example.  I am reasonably sure clever\npeople will find other uses as well.\n"},{"id":"22056","messageId":"cc723f590606190058w2d7481ecsaded46095aee2355@mail.gmail.com","threadId":"4565","inReplyTo":"7vpsh5a8gs.fsf@assigned-by-dhcp.cox.net","subject":"Re: simple use case scenario for --read-tree and --write-tree with --prefix option","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-06-19T07:58:31Z","receivedAt":"2006-06-19T07:58:31Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On 6/19/06, Junio C Hamano <junkio@cox.net> wrote:\n> \"Aneesh Kumar\" <aneesh.kumar@gmail.com> writes:\n>\n> > I searched the archives but didn't find anything. If i understand\n> > correctly the sub project idea is using the gitlink object type. So\n> > what is read-tree and write-tree with --prefix option supposed to\n> > achieve.\n>\n> The --prefix option to read-tree was very useful when I did a\n> hand merge of gitweb for example.  I am reasonably sure clever\n> people will find other uses as well.\n>\n\nOk i tried this\nmkdir test/test1\nmkdir test/test2\ncd test\ngit init-db\ncd test1\ngit init-db\ncd ../test2\ngit init-db\n\nnow  i do some devel under test2\nnow if i want to pull this with the history to toplevel directory test\nshould i be doing\n\ncd test\n\nkvaneesh@satan:/tmp/test$ git read-tree --prefix=test1/ $(cat\ntest1/.git/refs/heads/master)\nfatal: failed to unpack tree object c6c049d03f0bee0ac546ff6e436d5f6f3a5f4864\n\nBut the above command doesn't work for me. I guess i am missing something.\n\n-aneesh\n"},{"id":"22064","messageId":"20060619135343.GP2609@pasky.or.cz","threadId":"4565","inReplyTo":"cc723f590606190058w2d7481ecsaded46095aee2355@mail.gmail.com","subject":"Re: simple use case scenario for --read-tree and --write-tree with --prefix option","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-06-19T13:53:43Z","receivedAt":"2006-06-19T13:53:43Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Jun 19, 2006 at 09:58:31AM CEST, I got a letter\nwhere Aneesh Kumar <aneesh.kumar@gmail.com> said that...\n> cd test\n> \n> kvaneesh@satan:/tmp/test$ git read-tree --prefix=test1/ $(cat\n> test1/.git/refs/heads/master)\n> fatal: failed to unpack tree object c6c049d03f0bee0ac546ff6e436d5f6f3a5f4864\n> \n> But the above command doesn't work for me. I guess i am missing something.\n\nYou need to do a fetch to your /tmp/test repository first.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nA person is just about as big as the things that make them angry.\n"},{"id":"22065","messageId":"cc723f590606190850q4a200423ve3304c4f7df20267@mail.gmail.com","threadId":"4565","inReplyTo":"20060619135343.GP2609@pasky.or.cz","subject":"Re: simple use case scenario for --read-tree and --write-tree with --prefix option","fromName":"Aneesh Kumar","fromEmail":"aneesh.kumar@gmail.com","sentAt":"2006-06-19T15:50:08Z","receivedAt":"2006-06-19T15:50:08Z","isPatch":false,"sender":{"key":"aneesh.kumar@gmail.com","avatar":"https://gravatar.com/avatar/0621fc0b2f14ead1e9024382f16053a808c148596da30c1b92572fa075621f68?d=mp&s=160"},"body":"On 6/19/06, Petr Baudis <pasky@suse.cz> wrote:\n> Dear diary, on Mon, Jun 19, 2006 at 09:58:31AM CEST, I got a letter\n> where Aneesh Kumar <aneesh.kumar@gmail.com> said that...\n> > cd test\n> >\n> > kvaneesh@satan:/tmp/test$ git read-tree --prefix=test1/ $(cat\n> > test1/.git/refs/heads/master)\n> > fatal: failed to unpack tree object c6c049d03f0bee0ac546ff6e436d5f6f3a5f4864\n> >\n> > But the above command doesn't work for me. I guess i am missing something.\n>\n> You need to do a fetch to your /tmp/test repository first.\n>\n\n\nOk that made the --read-tree part work. But the log or whatchanged\ncommands doesn't gets me the history of changes with resepect to the\nfiles added.  Now i remember this is in a way simillar to gitweb\nhistory not shown. But then using the --full-history option with git\nlog also doesn't show the details of history with respect to the\nfiles.\n\nThis is what i did\n\ngit fetch ./test2/\ngit read-tree --prefix=test2/ $(cat test2/.git/refs/heads/master)\n\nNow if i look at .git/objects/ I can see commit objects with respect\nto changes for test2/a\n\n-aneesh\n"}]}