Re: BUG: Git path --config doesn't work with ~ symbol
- From
Jeff King <peff@peff.net>
- Date
- May 5, 2021, 19:01 UTC
- Message-ID
- <YJLrm0nqWL6TnUFb@coredump.intra.peff.net>
- In-Reply-To
- <CAEumJaA7NBm9Kdx7aCD1gavGguLmGcnvFcA52YvUk7g_FPzHZw@mail.gmail.com>
On Wed, May 05, 2021 at 09:59:58PM +0300, Theodor Negrescu wrote:
Show 8 quoted lines
> You're right, "notepad ~/test.txt" doesn't work either. > I figured out a workaround: > [alias] > cfg = "!git config --file $(echo ~)/git-settings/.gitconfig " > However what confuses me is that I also have > [core] > hooksPath = ~/git-settings/hooks > and that ~ works. So why doesn't it work in config --file?
Some config options that refer to paths specifically expand "~", exactly because there is no shell involved when Git reads them.
-Peff