git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: git@vger.kernel.org
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Subject: Re: What means "git config bla ~/"?
Date: Mon, 2 Oct 2017 16:06:29 +0200	[thread overview]
Message-ID: <dd28de03-9286-d5aa-3f00-9f6b7a85d71b@web.de> (raw)
In-Reply-To: <20171002061303.Horde.SL92grZCqTRV9oQkBFPELQ7@crashcourse.ca>

[When I try to reply to rpjday@crashcourse.ca then my SMTP server
 says "Requested action not taken: mailbox unavailable
 invalid DNS MX or A/AAAA resource record.", so I'm replying only
 to the list.]

Am 02.10.2017 um 12:13 schrieb rpjday@crashcourse.ca:
> 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?
"bla" represents any configuration option that you want to change.  It
is not literally a keyword recognized by git config.  You could replace
it with "foo", if that helps.

The comment in parentheses reminds readers that shells like bash do
tilde expansion for command line arguments.  Consider the following
command:

	$ git config format.outputDirectory ~/patches

Your shell rewrites "~/patches" to "/home/rpjday/patches" (or similar,
depending on your user name and home directory) before actually
executing git config. So even though git config doesn't expand ~ in
option values you'll still get a result like this afterwards:

	$ git config format.outputDirectory
	/home/rpjday/patches

René

  reply	other threads:[~2017-10-02 14:06 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 [this message]
2017-10-02 17:13 ` Jonathan Nieder
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=dd28de03-9286-d5aa-3f00-9f6b7a85d71b@web.de \
    --to=l.s.r@web.de \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    /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).