Re: [RFC/PATCH] git: expand user path in --git-dir
- From
Jan Engelhardt <jengelh@inai.de>
- Date
- Sep 25, 2012, 05:33 UTC
- Message-ID
- <alpine.LNX.2.01.1209250732150.25195@nerf07.vanv.qr>
- In-Reply-To
- <fdeaa78c0a520ce80e6d2cb09978dab348104eaf.1348491039.git.git@drmicha.warpmail.net>
On Monday 2012-09-24 14:57, Michael J Gruber wrote:
Show 10 quoted lines
>Currently, all paths in the config file are subject to tilde expansion >for user paths while the argument to --git-dir is not expanded, and >neither are paths in the environment such as GIT_DIR. From the user >perspective, though, the two commands > >GIT_DIR=~user/foo git command >git --git-dir=~user/foo command > >currently behave differently because in the first case the shell would >perform tilde expansion, but not in the second.
If git uses a standardized option logic (getopt-like) which accepts both '=' and (new argument) for long options, you could easily do
git --git-dir ~user/foo command