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

Re: [RFC] require-work-tree wants more than what its name says

From
Junio C Hamano <gitster@pobox.com>
Date
May 4, 2011, 15:47 UTC
Message-ID
<7vhb9afox9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110504085014.GA9739@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Check out some of the older scripts in contrib/examples. Several of them
> require_work_tree, but do not cd_to_toplevel immediately; instead, they
> do it much later for some specific bits.
Another datapoint I found was "clean".

It used to say "you have to be inside work tree" in the scripted version. Imagine what builtin/clean.c does today? It has NEED_WORK_TREE bit in the command table in git.c and that bit means "We need to have a work tree that we can later chdir to if we wanted to".

Previous: Jeff King
Message 12 of 12 in “[RFC] require-work-tree wants more than what its name says”
  1. Junio C HamanoMay 3, 2011
  2. Jeff KingMay 4, 2011
  3. Junio C HamanoMay 4, 2011
  4. Jeff KingMay 4, 2011
  5. Junio C HamanoMay 5, 2011
  6. Jeff KingMay 5, 2011
  7. Jeff KingMay 5, 2011
  8. Sverre RabbelierMay 5, 2011
  9. Junio C HamanoMay 5, 2011
  10. Michael J GruberMay 4, 2011
  11. Jeff KingMay 4, 2011
  12. Junio C HamanoMay 4, 2011

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.