git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: simple use case scenario for --read-tree and --write-tree with --prefix option

From
Aneesh Kumar <aneesh.kumar@gmail.com>
Date
Jun 19, 2006, 07:58 UTC
Message-ID
<cc723f590606190058w2d7481ecsaded46095aee2355@mail.gmail.com>
In-Reply-To
<7vpsh5a8gs.fsf@assigned-by-dhcp.cox.net>
On 6/19/06, Junio C Hamano <junkio@cox.net> wrote:
Show 11 quoted lines
> "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
Previous: Junio C HamanoNext: Petr Baudis
Message 3 of 5 in “simple use case scenario for --read-tree and --write-tree with --prefix option”
  1. Aneesh KumarJun 19, 2006
  2. Junio C HamanoJun 19, 2006
  3. Aneesh KumarJun 19, 2006
  4. Petr BaudisJun 19, 2006
  5. Aneesh KumarJun 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.