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".