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 venit, vidit, dixit 26.02.2009 21:11:
> This allows things like 'git -C /somewhere pull' without specifying both
> --work-tree and --git-dir.
> 

I'm afraid you hit a somewhat reoccurring issue here. chdir'ing looks
simple, but it has many side effects, such as on relative paths (as
Junio pointed out) but also on the order of parsing config. Having -C as
a global git option would require dealing with all of these effects.

On the other hand, a shell function can achieve the same very easily.
The side effects are left to be dealt with by the user then ;)

Michael
--
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