git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GIT_DIR vs. --git-dir
@ 2012-09-24  7:19 Michael J Gruber
  2012-09-24  7:41 ` Nguyen Thai Ngoc Duy
  2012-09-24 14:49 ` Jeff King
  0 siblings, 2 replies; 17+ messages in thread
From: Michael J Gruber @ 2012-09-24  7:19 UTC (permalink / raw)
  To: Git Mailing List

[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=/home/mjg/.githome rev-parse
--show-toplevel
/home/mjg

(All this is with core.worktree set to /home/mjg.)

So, while I do understand that we don't expand '~' in any of these cases
and it's only a matter of bash tilde expansion kicking in or not, we
might want to do something about it. (--git-dir=$HOME/.githome gets
expanded, as well, and --git-dir=.githome works from the appropriate cwd
only).

Michael

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-09-25  7:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).