public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha•warpmail.net>
To: Jan Engelhardt <jengelh@inai•de>
Cc: git@vger•kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>
Subject: Re: [RFC/PATCH] git: expand user path in --git-dir
Date: Tue, 25 Sep 2012 09:27:47 +0200	[thread overview]
Message-ID: <50615CF3.2010802@drmicha.warpmail.net> (raw)
In-Reply-To: <alpine.LNX.2.01.1209250732150.25195@nerf07.vanv.qr>

Jan Engelhardt venit, vidit, dixit 25.09.2012 07:33:
> 
> On Monday 2012-09-24 14:57, Michael J Gruber wrote:
> 
>> 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

Of course, but wouldn't it be even more confusing if tilde expansion "is
done" for "--git-dir ~user/foo" but not "--git-dir=~user/foo"?

That confusion is all bash's "fault" since "is done" == "is done by
bash" (or not), but still.

Michael

  reply	other threads:[~2012-09-25  7:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24  7:19 GIT_DIR vs. --git-dir Michael J Gruber
2012-09-24  7:41 ` Nguyen Thai Ngoc Duy
2012-09-24  7:57   ` Michael J Gruber
2012-09-24  9:53     ` Nguyen Thai Ngoc Duy
2012-09-24 12:56       ` Michael J Gruber
2012-09-24 12:57         ` [RFC/PATCH] git: expand user path in --git-dir Michael J Gruber
2012-09-24 14:52           ` Jeff King
2012-09-24 14:57             ` Michael J Gruber
2012-09-24 17:30           ` Junio C Hamano
2012-09-25  5:33           ` Jan Engelhardt
2012-09-25  7:27             ` Michael J Gruber [this message]
2012-09-24 13:37         ` GIT_DIR vs. --git-dir Andreas Schwab
2012-09-24 14:36   ` Junio C Hamano
2012-09-24 14:51     ` Michael J Gruber
2012-09-24 14:49 ` Jeff King
2012-09-24 14:54   ` Michael J Gruber
2012-09-24 15:42   ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50615CF3.2010802@drmicha.warpmail.net \
    --to=git@drmicha$(echo .)warpmail.net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jengelh@inai$(echo .)de \
    --cc=pclouds@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox