Re: [PATCH] checkout-index needs a working tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux