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

Re: [PATCH] worktree: provide better prefix to go back to original cwd

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Oct 7, 2010, 03:14 UTC
Message-ID
<AANLkTim7=8ALxBKWhYcZRSqAcxi0O-T-pxmYpG8_N8v7@mail.gmail.com>
In-Reply-To
<7v4ocz18az.fsf@alter.siamese.dyndns.org>
On Thu, Oct 7, 2010 at 1:32 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> Are there any examples to illustrate whether teaching --show-prefix to
>> do what your --worktree-to-cwd does would be a good or bad idea?
>> (Just curious.)
>
> Do these additions interact well with the notion of "we are in the working
> tree" vs "we are outside the working tree"?  Even when we happen to know
> via GIT_WORK_TREE that the root of the working tree is /var/tmp/junk, we
> should correctly diagnse that we are outside the working tree when we are
> in /var/tmp/, and require_work_tree should say "no you are not allowed to
> do this", no?

It should work as it does now. I don't change prefix calculation and chdir() behavior. So when you're at /var/tmp, require_work_tree should say no.

-- 
Duy
Previous: Junio C HamanoNext: Nguyen Thai Ngoc Duy
Message 5 of 6 in “worktree: provide better prefix to go back to original cwd”
  1. worktree: provide better prefix to go back to original cwdNguyễn Thái Ngọc Duy, Oct 6, 2010
  2. Chris PackhamOct 6, 2010
  3. Jonathan NiederOct 6, 2010
  4. Junio C HamanoOct 6, 2010
  5. Nguyen Thai Ngoc DuyOct 7, 2010
  6. Nguyen Thai Ngoc DuyOct 7, 2010

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.