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
Dale R. Worley <worley@alum.mit.edu>
Date
Oct 18, 2013, 22:54 UTC
Message-ID
<201310182254.r9IMslOr003223@freeze.ariadne.com>
In-Reply-To
<xmqqr4bjy63y.fsf@gitster.dls.corp.google.com>
> From: Junio C Hamano <gitster@pobox.com>
> It was unclear to me which part of our documentation needs updating
> and how, and that was (and still is) what I was primarily interested
> in finding out.

It seems to me that what is missing is a description of the circumstances under which Git can be run. With Subversion (the only other source control system I know in detail), the working tree that is operated on is at and below the cwd, and the working tree always points to the repository. (A subdirectory of a working tree is also a valid working tree.)

With Git, it seems that the basic usage is that Git searches upward from the cwd to find the top of the work tree, which is distinguished by having a .git subdirectory. The rules when the worktree is detached are more complicated, and don't seem to be written in any single place.

Dale
Previous: Philip OakleyNext: Dale R. Worley
Message 11 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.