git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: rpjday@crashcourse.ca
Cc: git@vger.kernel.org
Subject: Re: What means "git config bla ~/"?
Date: Mon, 2 Oct 2017 10:13:00 -0700	[thread overview]
Message-ID: <20171002171300.GP19555@aiede.mtv.corp.google.com> (raw)
In-Reply-To: <20171002061303.Horde.SL92grZCqTRV9oQkBFPELQ7@crashcourse.ca>

Hi,

rpjday@crashcourse.ca wrote:

> i'm sure i'm about to embarrass myself but, in "man git-config",
> OPTIONS, one reads:
>
>   --path
>
> git-config will expand leading ~ to the value of $HOME, and ~user
> to the   home directory for the specified user. This option has no
> effect when setting the value (but you can use git config bla ~/
> from the command line to let your shell do the expansion).
>
> what's with that "git config bla ~/"? is this some config keyword
> or something?

No need to be embarrased.  Here "bla" is a placeholder.  That is,
for example, I can run

	git config --global include.path ~/.config/git/more-config

or

	git config --global include.path $HOME/.config/git/more-config

to cause

	[include]
		path = /home/me/.config/git/more-config

to be added to my global configuration.  The expansion of ~ or $HOME
is performed by my shell, not Git.  For comparison, if I had run

	git config --global include.path '~/.config/git/more-config'

then that would cause

	[include]
		path = ~/.config/git/more-config

to be added to my global configuration, but it would still have the
same effect at run time, since Git is also able to expand ~ to my home
directory.

The wording comes from

	commit 1349484e341a3ec2ba02a86c8fbd97ea9dc8c756
	Author: Matthieu Moy <Matthieu.Moy@imag.fr>
	Date:   Wed Dec 30 17:51:53 2009 +0100

	    builtin-config: add --path option doing ~ and ~user expansion.

I agree with you that it is less clear than it could be.  Ideas for
clarifying it?

Thanks,
Jonathan

  parent reply	other threads:[~2017-10-02 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 10:13 What means "git config bla ~/"? rpjday
2017-10-02 14:06 ` René Scharfe
2017-10-02 17:13 ` Jonathan Nieder [this message]
2017-10-03  0:08   ` Junio C Hamano
2017-10-03 11:45     ` Matthieu Moy
2017-10-04  4:01       ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20171002171300.GP19555@aiede.mtv.corp.google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).