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

Re: Built-in checkout: wrong behaviour in subdirectories

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 20, 2008, 23:42 UTC
Message-ID
<7vd4qr2o03.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vhcg32p0i.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
> Daniel Barkalow <barkalow@iabervon.org> writes:
>
>> Junio: it looks like something used to cause read-tree to be run with 
>> pwd being the working tree root in git-checkout.sh.
>
> "Something"?  I think we explicitly cdup when switching
> branches, and we should do the same in C rewrite.
>
>         # We are switching branches and checking out trees, so
>         # we *NEED* to be at the toplevel.
>         cd_to_toplevel

Isn't it just the matter of not passing prefix to topts in merge_working_tree()? Your other calls to unpack_trees() do not seem to pass bogus prefix to it.

IIRC, the "prefix" to unpack_trees() is not about the path limiter, but grafting a tree into a place where it originally was not intended to be (i.e. to support "read-tree --prefix").

Previous: Junio C HamanoNext: Daniel Barkalow
Message 4 of 6 in “Built-in checkout: wrong behaviour in subdirectories”
  1. Clemens BuchacherFeb 20, 2008
  2. Daniel BarkalowFeb 20, 2008
  3. Junio C HamanoFeb 20, 2008
  4. Junio C HamanoFeb 20, 2008
  5. Daniel BarkalowFeb 21, 2008
  6. checkout: work from a subdirectoryJunio C Hamano, Feb 20, 2008

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.