Jeff King writes:
> Bash is even weirder than you might think. Try this:
>
> $ echo ~/foo
> /home/peff/foo
>
> $ echo arg=~/foo
> arg=/home/peff/foo
>
> $ echo --arg=~/foo
> --arg=~/foo
Bash expands all arguments that look like variable assignments. That
lets you write "export arg=~
Jeff King venit, vidit, dixit 24.09.2012 16:49:
> On Mon, Sep 24, 2012 at 09:19:27AM +0200, Michael J Gruber wrote:
>
>> [mjg@localhost ~]$ GIT_DIR=~/.githome git rev-parse --show-toplevel
>> /home/mjg
>>
>> [mjg@localhost ~]$ git --git-dir=~/.githome rev-parse --show-toplevel
>> fatal: Not a git
Junio C Hamano venit, vidit, dixit 24.09.2012 16:36:
> Nguyen Thai Ngoc Duy writes:
>
>> "~" is a shell feature. Know your shell. If we make an exception for
>> --git-dir, we might have to support --blahblah=~/somewhere.
>
> Correct but not entirely true.
>
> When we know --git-dir= must name a
On Mon, Sep 24, 2012 at 09:19:27AM +0200, Michael J Gruber wrote:
> [mjg@localhost ~]$ GIT_DIR=~/.githome git rev-parse --show-toplevel
> /home/mjg
>
> [mjg@localhost ~]$ git --git-dir=~/.githome rev-parse --show-toplevel
> fatal: Not a git repository: '~/.githome'
>
> Huh? Ok, so most users pro
Nguyen Thai Ngoc Duy writes:
> "~" is a shell feature. Know your shell. If we make an exception for
> --git-dir, we might have to support --blahblah=~/somewhere.
Correct but not entirely true.
When we know --git-dir= must name a path, we should be able to
do better. See OPT_FILENAME in >parse-
Michael J Gruber writes:
> But that argument applies to config files in exactly the same way as it
> applies to command line arguments. Git is the only one reading them. So
> why not leave it up to Git to decide about expansion?
Command line arguments are first processed by the shell, handling
e
Nguyen Thai Ngoc Duy venit, vidit, dixit 24.09.2012 11:53:
> On Mon, Sep 24, 2012 at 2:57 PM, Michael J Gruber
> wrote:
>> It might be difficult to implement, but I'm sorry I can't follow the
>> argumentation above at all; it's not based on what we do in other places
>> and other cases.
>
> My po
On Mon, Sep 24, 2012 at 2:57 PM, Michael J Gruber
wrote:
> It might be difficult to implement, but I'm sorry I can't follow the
> argumentation above at all; it's not based on what we do in other places
> and other cases.
My point is, what's so special about --git-dir? what about
--work-tree, or
Nguyen Thai Ngoc Duy venit, vidit, dixit 24.09.2012 09:41:
> On Mon, Sep 24, 2012 at 2:19 PM, Michael J Gruber
> wrote:
>> [mjg@localhost ~]$ GIT_DIR=~/.githome git rev-parse --show-toplevel
>> /home/mjg
>>
>> [mjg@localhost ~]$ git --git-dir=~/.githome rev-parse --show-toplevel
>> fatal: Not a gi
On Mon, Sep 24, 2012 at 2:19 PM, Michael J Gruber
wrote:
> [mjg@localhost ~]$ GIT_DIR=~/.githome git rev-parse --show-toplevel
> /home/mjg
>
> [mjg@localhost ~]$ git --git-dir=~/.githome rev-parse --show-toplevel
> fatal: Not a git repository: '~/.githome'
>
> Huh?
The message looks pretty clear
[mjg@localhost ~]$ GIT_DIR=~/.githome git rev-parse --show-toplevel
/home/mjg
[mjg@localhost ~]$ git --git-dir=~/.githome rev-parse --show-toplevel
fatal: Not a git repository: '~/.githome'
Huh? Ok, so most users probably would not try further and blame git, but:
[mjg@localhost ~]$ git --git-dir
11 matches
Mail list logo