git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: BUG: Git path --config doesn't work with ~ symbol

From
TNTheodor Negrescu <theodor.negrescu@gmail.com>
Date
May 5, 2021, 18:13 UTC
Message-ID
<CAEumJaBDqSyqbnvWSeCyXYQJz92dOg+y1pz2JLjPSMRzWxc1aA@mail.gmail.com>
In-Reply-To
<CAEumJaDRvU8LP=q3PQ1z6-cg75DmbHE_7OXZVA+nm=-77pVLEg@mail.gmail.com>
I meant Git config --file!! Sorry, I wrote the wrong thing in the title.

On Wed, May 5, 2021 at 9:06 PM Theodor Negrescu <theodor.negrescu@gmail.com> wrote:

Show 48 quoted lines
>
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
>
> I ran the command "git config --file ~/git-settings/.gitconfig -l"
> (git-settings is a repo where I keep my config, the global one is just
> an include)
>
> What did you expect to happen? (Expected behavior)
>
> It would list the settings in the file.
>
> What happened instead? (Actual behavior)
>
> fatal: unable to read config file '~/git-settings/.gitconfig': No such
> file or directory
>
> What's different between what you expected and what actually happened?
>
> The ~ symbol should point to my home folder.
>
> Anything else you want to add:
>
> "git config --file ~/.gitconfig -l" doesn't work either so the ~
> symbol is the problem.
> fatal: unable to read config file '~/.gitconfig': No such file or directory
> "git config --file .gitconfig -l" works when I run it from my home
> folder or from git-settings so the --file argument is working.
>
> [System Info]
> git version:
> git version 2.31.1.windows.1
> cpu: x86_64
> built from commit: c5f0be26a7e3846e3b6268d1c6c4800d838c6bbb
> sizeof-long: 4
> sizeof-size_t: 8
> shell-path: /bin/sh
> feature: fsmonitor--daemon
> uname: Windows 10.0 19042
> compiler info: gnuc: 10.2
> libc info: no libc information available
> $SHELL (typically, interactive shell): <unset>
>
>
> [Enabled Hooks]
> not run from a git repository - no hooks to show
Previous: Theodor NegrescuNext: Jeff King
Message 2 of 9 in “BUG: Git path --config doesn't work with ~ symbol”
  1. Theodor NegrescuMay 5, 2021
  2. Theodor NegrescuMay 5, 2021
  3. Jeff KingMay 5, 2021
  4. Eric SunshineMay 5, 2021
  5. Theodor NegrescuMay 5, 2021
  6. Jeff KingMay 5, 2021
  7. Theodor NegrescuMay 5, 2021
  8. Jeff KingMay 5, 2021
  9. Jeff KingMay 5, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.