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

Re: nd/setup

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Apr 9, 2010, 06:56 UTC
Message-ID
<l2ofcaeb9bf1004082356t2c304902l3f089b701299cec0@mail.gmail.com>
In-Reply-To
<20100409055701.GA9554@progeny.tock>
On Fri, Apr 9, 2010 at 7:57 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 27 quoted lines
> Nguyen Thai Ngoc Duy wrote:
>> 2010/4/8 Jonathan Nieder <jrnieder@gmail.com>:
>
>>> A few of the earlier patches seem iffy, though they all start with a
>>> correct idea.  For example, one of them changes the semantics of
>>> rev-parse --show-prefix without documenting it.  So I have been looking
>>
>> You meant "rev-parse --git-dir"?
>
> I meant --show-prefix.  ad36c84 (worktree setup: calculate prefix even
> if no worktree is found, 2010-04-05) teaches rev-parse to produce a
> nonempty prefix even when there is no workdir but didn’t update the
> documentation:
>
>    --show-prefix
>         When the command is invoked from a subdirectory, show the
>         path of the current directory relative to the top-level
>         directory.
>
> I suspect it’s a good change.  Git ought to correctly honor relative
> paths on the command line even when there is no work tree.  But the
> semantics are not clear any more --- when there is no top-level
> directory, what is the prefix relative to?
>
> Probably my other words of warning were also too extreme.  I have been
> using a copy of git with nd/setup included, and aside from the
> ls-remote problem I mentioned, I haven’t run into any trouble.

OK. I thought it was expectation and did not check documentation. The assumption that $GIT_DIR stays at worktree's top directory is still around.. I'll rethink about this.

-- 
Duy
Previous: Jonathan NiederNext: Nguyen Thai Ngoc Duy
Message 17 of 18 in “What's cooking in git.git (Apr 2010, #03; Wed, 07)”
  1. Junio C HamanoApr 8, 2010
  2. Johannes SixtApr 8, 2010
  3. Junio C HamanoApr 8, 2010
  4. Fredrik KuivinenApr 8, 2010
  5. Tor ArntsenApr 8, 2010
  6. Tor ArntsenApr 8, 2010
  7. Jeff KingApr 8, 2010
  8. nd/setupJonathan Nieder, Apr 8, 2010
  9. Jeff KingApr 9, 2010
  10. Take it easy on unallowed access to non-existent repositoryNguyễn Thái Ngọc Duy, Apr 11, 2010
  11. Sverre RabbelierApr 11, 2010
  12. Nguyen Thai Ngoc DuyApr 11, 2010
  13. Sverre RabbelierApr 11, 2010
  14. Nguyen Thai Ngoc DuyApr 11, 2010
  15. Nguyen Thai Ngoc DuyApr 9, 2010
  16. Jonathan NiederApr 9, 2010
  17. Nguyen Thai Ngoc DuyApr 9, 2010
  18. Nguyen Thai Ngoc DuyApr 11, 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.