git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* simple use case scenario for --read-tree and --write-tree with --prefix option
@ 2006-06-19  7:28 Aneesh Kumar
  2006-06-19  7:52 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Aneesh Kumar @ 2006-06-19  7:28 UTC (permalink / raw)
  To: Git Mailing List

Hi all,

I searched the archives but didn't find anything. If i understand
correctly the sub project idea is using the gitlink object type. So
what is read-tree and write-tree with --prefix option supposed to
achieve.

-aneesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: simple use case scenario for --read-tree and --write-tree with --prefix option
  2006-06-19  7:28 simple use case scenario for --read-tree and --write-tree with --prefix option Aneesh Kumar
@ 2006-06-19  7:52 ` Junio C Hamano
  2006-06-19  7:58   ` Aneesh Kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2006-06-19  7:52 UTC (permalink / raw)
  To: Aneesh Kumar; +Cc: git

"Aneesh Kumar" <aneesh.kumar@gmail.com> writes:

> I searched the archives but didn't find anything. If i understand
> correctly the sub project idea is using the gitlink object type. So
> what is read-tree and write-tree with --prefix option supposed to
> achieve.

The --prefix option to read-tree was very useful when I did a
hand merge of gitweb for example.  I am reasonably sure clever
people will find other uses as well.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: simple use case scenario for --read-tree and --write-tree with --prefix option
  2006-06-19  7:52 ` Junio C Hamano
@ 2006-06-19  7:58   ` Aneesh Kumar
  2006-06-19 13:53     ` Petr Baudis
  0 siblings, 1 reply; 5+ messages in thread
From: Aneesh Kumar @ 2006-06-19  7:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On 6/19/06, Junio C Hamano <junkio@cox.net> wrote:
> "Aneesh Kumar" <aneesh.kumar@gmail.com> writes:
>
> > I searched the archives but didn't find anything. If i understand
> > correctly the sub project idea is using the gitlink object type. So
> > what is read-tree and write-tree with --prefix option supposed to
> > achieve.
>
> The --prefix option to read-tree was very useful when I did a
> hand merge of gitweb for example.  I am reasonably sure clever
> people will find other uses as well.
>

Ok i tried this
mkdir test/test1
mkdir test/test2
cd test
git init-db
cd test1
git init-db
cd ../test2
git init-db

now  i do some devel under test2
now if i want to pull this with the history to toplevel directory test
should i be doing

cd test

kvaneesh@satan:/tmp/test$ git read-tree --prefix=test1/ $(cat
test1/.git/refs/heads/master)
fatal: failed to unpack tree object c6c049d03f0bee0ac546ff6e436d5f6f3a5f4864

But the above command doesn't work for me. I guess i am missing something.

-aneesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: simple use case scenario for --read-tree and --write-tree with --prefix option
  2006-06-19  7:58   ` Aneesh Kumar
@ 2006-06-19 13:53     ` Petr Baudis
  2006-06-19 15:50       ` Aneesh Kumar
  0 siblings, 1 reply; 5+ messages in thread
From: Petr Baudis @ 2006-06-19 13:53 UTC (permalink / raw)
  To: Aneesh Kumar; +Cc: Junio C Hamano, git

Dear diary, on Mon, Jun 19, 2006 at 09:58:31AM CEST, I got a letter
where Aneesh Kumar <aneesh.kumar@gmail.com> said that...
> cd test
> 
> kvaneesh@satan:/tmp/test$ git read-tree --prefix=test1/ $(cat
> test1/.git/refs/heads/master)
> fatal: failed to unpack tree object c6c049d03f0bee0ac546ff6e436d5f6f3a5f4864
> 
> But the above command doesn't work for me. I guess i am missing something.

You need to do a fetch to your /tmp/test repository first.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: simple use case scenario for --read-tree and --write-tree with --prefix option
  2006-06-19 13:53     ` Petr Baudis
@ 2006-06-19 15:50       ` Aneesh Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Aneesh Kumar @ 2006-06-19 15:50 UTC (permalink / raw)
  To: Petr Baudis; +Cc: Junio C Hamano, git

On 6/19/06, Petr Baudis <pasky@suse.cz> wrote:
> Dear diary, on Mon, Jun 19, 2006 at 09:58:31AM CEST, I got a letter
> where Aneesh Kumar <aneesh.kumar@gmail.com> said that...
> > cd test
> >
> > kvaneesh@satan:/tmp/test$ git read-tree --prefix=test1/ $(cat
> > test1/.git/refs/heads/master)
> > fatal: failed to unpack tree object c6c049d03f0bee0ac546ff6e436d5f6f3a5f4864
> >
> > But the above command doesn't work for me. I guess i am missing something.
>
> You need to do a fetch to your /tmp/test repository first.
>


Ok that made the --read-tree part work. But the log or whatchanged
commands doesn't gets me the history of changes with resepect to the
files added.  Now i remember this is in a way simillar to gitweb
history not shown. But then using the --full-history option with git
log also doesn't show the details of history with respect to the
files.

This is what i did

git fetch ./test2/
git read-tree --prefix=test2/ $(cat test2/.git/refs/heads/master)

Now if i look at .git/objects/ I can see commit objects with respect
to changes for test2/a

-aneesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-19 15:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-19  7:28 simple use case scenario for --read-tree and --write-tree with --prefix option Aneesh Kumar
2006-06-19  7:52 ` Junio C Hamano
2006-06-19  7:58   ` Aneesh Kumar
2006-06-19 13:53     ` Petr Baudis
2006-06-19 15:50       ` Aneesh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).