Re: [PATCH] added -C option to chdir() into another directory first

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

 



kevin brintnall <kbrint@xxxxxxxxx> writes:

> On Thu, Feb 26, 2009 at 12:35:57PM -0800, Junio C Hamano wrote:
>> kevin brintnall <kbrint@xxxxxxxxx> writes:
>> 
>> > This allows things like 'git -C /somewhere pull' without specifying both
>> > --work-tree and --git-dir.
>> 
>> Where should "git -C sub/dir apply this.patch" find the file "this.patch"?
>
> Good question..  It should probably come from the original $PWD.  Maybe we
> should have "-C $DIR" simulate "--work-tree=$DIR --git=dir=$DIR/.git" ?
>
>> More generally, when "git -C there cmd arg1 arg2 arg3..." is run, how
>> should the implementation of cmd learn what to prefix arg$N with?
>
> I envisioned these two as equivalent:
>
> 	git -C $DIR something
> 	cd $DIR ; git something

If that is the case then I really do not see the point, other than "there
are _some_ tools like 'tar' that do it".

Sure, there are some tools that do many other things.  So what?
--
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