[mjg@localhost ~]$ GIT_DIR=~/.githome git rev-parse --show-toplevel

[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

(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

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to