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

[BUG] PREFIX environment variable ignored by git config --system

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Jan 29, 2025, 16:34 UTC
Message-ID
<007f01db726b$ac911ce0$05b356a0$@nexbridge.com>
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) export PREFIX=/home/randall git config --system --list

What did you expect to happen? (Expected behavior) Git should use ${PREFIX}/etc/gitconfig instead of the build location to locate System configuration items, per 10.8 in the git-scm website documentation on Environment Variables. Git should have reported: fatal: unable to read config file '/home/randall/etc/gitconfig': No such file or directory

What happened instead? (Actual behavior) git used /usr/local-ssl3.0/etc/gitconfig instead and reported that the file does not exist: fatal: unable to read config file '/usr/local-ssl3.0/etc/gitconfig': No such file or directory

What's different between what you expected and what actually happened? The directory being used based on the PREFIX variable.

Anything else you want to add: This appears to be a problem on all platforms.

[System Info] git version: git version 2.47.1 cpu: NSV built from commit: 92999a42db1c5f43f330e4f2bca4026b5b81576f sizeof-long: 4

[System Info] git version: git version 2.45.1 cpu: x86_64 no commit associated with this build sizeof-long: 8

-- Brief whoami: NonStop&UNIX developer since approximately UNIX(421664400) NonStop(211288444200000000) -- In real life, I talk too much.

Next: Junio C Hamano
Message 1 of 15 in “[BUG] PREFIX environment variable ignored by git config --system”
  1. rsbecker@nexbridge.comJan 29, 2025
  2. Junio C HamanoJan 29, 2025
  3. rsbecker@nexbridge.comJan 29, 2025
  4. Junio C HamanoJan 29, 2025
  5. rsbecker@nexbridge.comJan 29, 2025
  6. Junio C HamanoJan 29, 2025
  7. rsbecker@nexbridge.comJan 29, 2025
  8. Junio C HamanoJan 29, 2025
  9. rsbecker@nexbridge.comJan 30, 2025
  10. Junio C HamanoJan 30, 2025
  11. rsbecker@nexbridge.comJan 30, 2025
  12. Ben KnobleJan 30, 2025
  13. Junio C HamanoJan 30, 2025
  14. rsbecker@nexbridge.comJan 29, 2025
  15. Junio C HamanoJan 29, 2025

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.