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

Re: [git-users] Problem using detached worktrees with commands implemented in scripts

From
Philip Oakley <philipoakley@iee.org>
Date
Oct 17, 2013, 20:11 UTC
Message-ID
<3401D1F36F134CDDB0881B196F79CB3A@PhilipOakley>
In-Reply-To
<xmqqk3hc3jbw.fsf@gitster.dls.corp.google.com>
From: "Junio C Hamano" <gitster@pobox.com>
Show 9 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> ... and the detection process for 'toplevel' may not work
>> properly when in a separated work-tree environment.
>
> Without GIT_WORK_TREE exported to point at the top-level, there is
> nothing that lets us "detect" it, as the working tree does not have
> ".git" directory to tell us to stop, no?
>
"No", but not in that way.

My point (to Dale) was, as you state, that the "cd to top level" was (IIUC) the probable causes of the fault, and that a documentation update would probably be appropriate for the discussion on exporting GIT_WORK_TREE, and that it would specifically mention those git commands that needed to "cd to top level", and hence would not work in such an environment. (I wasn't sure where the appropriate "cd to top level" function was)

An explanation here on the list wouldn't solve the problems for others who are yet to make the same mistake, hence the implied suggestion.

Philip 
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 17 in “[git-users] Problem using detached worktrees with commands implemented in scripts”
  1. Dale R. WorleyOct 16, 2013
  2. Junio C HamanoOct 16, 2013
  3. Philip OakleyOct 16, 2013
  4. Junio C HamanoOct 16, 2013
  5. Philip OakleyOct 17, 2013
  6. Junio C HamanoOct 17, 2013
  7. Philip OakleyOct 17, 2013
  8. Philip OakleyOct 17, 2013
  9. Jonathan NiederOct 17, 2013
  10. Philip OakleyOct 18, 2013
  11. Dale R. WorleyOct 18, 2013
  12. Dale R. WorleyOct 17, 2013
  13. Junio C HamanoOct 17, 2013
  14. Dale R. WorleyOct 18, 2013
  15. Junio C HamanoOct 18, 2013
  16. Dale R. WorleyOct 21, 2013
  17. Dale R. WorleyOct 18, 2013

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.