From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] checkout-index needs a working tree
Date: Sun, 5 Aug 2007 02:33:09 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0708050229200.14781@racer.site> (raw)
In-Reply-To: <7vvebuj4nw.fsf@assigned-by-dhcp.cox.net>
Hi,
On Sat, 4 Aug 2007, Junio C Hamano wrote:
> I wonder if it would help us to catch similar breakages if we change
> git.c::run_command() so that we do not pass prefix (or pass a bogus
> pointer ((const char *)1)) for commands that do not ask for
> NEED_WORK_TREE.
I tried that, but we have some places where we ask "if (prefix &&
*prefix)", for example in ls-tree. It does not _require_ a work tree, but
it certainly uses it when it is available -- which is fine.
Other users are more tricky, such as ls-files and update-index, which need
a working tree only in some cases.
I'll probably write a patch on Monday (if nobody else is faster) to
provide a function "require_work_tree()" in environment.c, which does the
obvious (with caching). Then comes the tedious part: identifying all
those options that need a working tree...
Ciao,
Dscho
next prev parent reply other threads:[~2007-08-05 1:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-04 22:20 [PATCH] checkout-index needs a working tree Johannes Schindelin
2007-08-04 22:50 ` Junio C Hamano
2007-08-05 1:33 ` Johannes Schindelin [this message]
2007-08-09 22:35 ` Uwe Kleine-König
2007-08-10 0:31 ` Johannes Schindelin
2007-08-10 0:55 ` Junio C Hamano
2007-08-10 1:11 ` Johannes Schindelin
2007-08-10 7:57 ` [PATCH] Reinstate the old behaviour when GIT_DIR is set and GIT_WORK_TREE is unset Junio C Hamano
2007-08-10 11:28 ` Uwe Kleine-König
2007-08-10 19:26 ` Junio C Hamano
2007-08-11 5:17 ` Junio C Hamano
2007-08-11 18:15 ` [PATCH] checkout-index doc: use --work-dir in the export example Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0708050229200.14781@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).