* [BUG] PREFIX environment variable ignored by git config --system
@ 2025-01-29 16:34 rsbecker
2025-01-29 16:41 ` Junio C Hamano
0 siblings, 1 reply; 15+ messages in thread
From: rsbecker @ 2025-01-29 16:34 UTC (permalink / raw)
To: git
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 16:34 [BUG] PREFIX environment variable ignored by git config --system rsbecker
@ 2025-01-29 16:41 ` Junio C Hamano
2025-01-29 17:01 ` rsbecker
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Junio C Hamano @ 2025-01-29 16:41 UTC (permalink / raw)
To: rsbecker; +Cc: git
<rsbecker@nexbridge.com> writes:
> 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
But that is now how PREFIX works, as far as I remember. PREFIX is a
build-time thing.
Perhaps you are looking for RUNTIME_PREFIX build-time option? I do
not know how well it is maintained these days, and if it allows you
to futz with the paths at runtime (without _moving_ the executable
and all other installation material en masse), though.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 16:41 ` Junio C Hamano
@ 2025-01-29 17:01 ` rsbecker
2025-01-29 20:15 ` Junio C Hamano
2025-01-29 18:20 ` rsbecker
2025-01-29 23:48 ` Junio C Hamano
2 siblings, 1 reply; 15+ messages in thread
From: rsbecker @ 2025-01-29 17:01 UTC (permalink / raw)
To: 'Junio C Hamano'; +Cc: git
On January 29, 2025 11:42 AM, Junio C Hamano. Wrote:
><rsbecker@nexbridge.com> writes:
>
>> 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
>
>But that is now how PREFIX works, as far as I remember. PREFIX is a
build-time
>thing.
>
>Perhaps you are looking for RUNTIME_PREFIX build-time option? I do not
know
>how well it is maintained these days, and if it allows you to futz with the
paths at
>runtime (without _moving_ the executable and all other installation
material en
>masse), though.
The documentation on the Environment Configuration page seems to imply that
these are run-time variables, not build time, which should come from the
config.mak.uname. In any event, I'm in a situation where I do not have the
security to create the actual ../etc directory so am trying to test an
alternate
location. Some of the customers I am supporting have experienced this also.
Any ideas on handling an execution time override of the system location,
instead of
just using GIT_CONFIG_NOSYSTEM to turn off --system?
I would gladly add GIT_CONFIG_SYSTEM=path with a little guidance, if that's
what it
comes down to.
--Randall
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 16:41 ` Junio C Hamano
2025-01-29 17:01 ` rsbecker
@ 2025-01-29 18:20 ` rsbecker
2025-01-29 23:48 ` Junio C Hamano
2 siblings, 0 replies; 15+ messages in thread
From: rsbecker @ 2025-01-29 18:20 UTC (permalink / raw)
To: 'Junio C Hamano'; +Cc: git
On January 29, 2025 11:42 AM, Junio C Hamano wrote:
><rsbecker@nexbridge.com> writes:
>
>> 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
>
>But that is now how PREFIX works, as far as I remember. PREFIX is a
build-time
>thing.
>
>Perhaps you are looking for RUNTIME_PREFIX build-time option? I do not
know
>how well it is maintained these days, and if it allows you to futz with the
paths at
>runtime (without _moving_ the executable and all other installation
material en
>masse), though.
I did try that at runtime. No luck. I think we need to fix this.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 17:01 ` rsbecker
@ 2025-01-29 20:15 ` Junio C Hamano
2025-01-29 20:33 ` rsbecker
0 siblings, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2025-01-29 20:15 UTC (permalink / raw)
To: rsbecker; +Cc: git
<rsbecker@nexbridge.com> writes:
> The documentation on the Environment Configuration page seems to imply that
Sorry, I am totally lost. Whose documentation on what software are
you referring to?
$ git grep -i -e 'environment configuration'
comes back empty.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 20:15 ` Junio C Hamano
@ 2025-01-29 20:33 ` rsbecker
2025-01-29 23:36 ` Junio C Hamano
0 siblings, 1 reply; 15+ messages in thread
From: rsbecker @ 2025-01-29 20:33 UTC (permalink / raw)
To: 'Junio C Hamano'; +Cc: git
On January 29, 2025 3:15 PM, Junio C Hamano wrote:
><rsbecker@nexbridge.com> writes:
>
>> The documentation on the Environment Configuration page seems to imply
>> that
>
>Sorry, I am totally lost. Whose documentation on what software are you
referring
>to?
>
> $ git grep -i -e 'environment configuration'
>
>comes back empty.
It is here:
https://git-scm.com/book/ms/v2/Git-Internals-Environment-Variables
A few paragraphs from the top.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 20:33 ` rsbecker
@ 2025-01-29 23:36 ` Junio C Hamano
2025-01-29 23:49 ` rsbecker
0 siblings, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2025-01-29 23:36 UTC (permalink / raw)
To: rsbecker; +Cc: git
<rsbecker@nexbridge.com> writes:
> On January 29, 2025 3:15 PM, Junio C Hamano wrote:
>><rsbecker@nexbridge.com> writes:
>>
>>> The documentation on the Environment Configuration page seems to imply
>>> that
>>
>>Sorry, I am totally lost. Whose documentation on what software are you
> referring
>>to?
>>
>> $ git grep -i -e 'environment configuration'
>>
>>comes back empty.
>
> It is here:
> https://git-scm.com/book/ms/v2/Git-Internals-Environment-Variables
It is news to me ;-).
$ git grep '[^_]PREFIX[^_]'
does not have any hits in the source, so I do not see how we _could_
be paying any attention to such a thing.
The description seems to originate at
https://github.com/progit2-ms/progit2/commit/c24f22d6a6b0572f5756afd64f0c2e9fa6f804fa
that was more than 10 years old. I do not know how reliable the
description there is.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 16:41 ` Junio C Hamano
2025-01-29 17:01 ` rsbecker
2025-01-29 18:20 ` rsbecker
@ 2025-01-29 23:48 ` Junio C Hamano
2 siblings, 0 replies; 15+ messages in thread
From: Junio C Hamano @ 2025-01-29 23:48 UTC (permalink / raw)
To: rsbecker; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> <rsbecker@nexbridge.com> writes:
>>
>>> 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
>>
>> But that is now how PREFIX works, as far as I remember. PREFIX is a
>> build-time thing.
>
> Sorry, I misspoke.
>
> I was talking about $(prefix) Makefile macro, that is all lowercase.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 23:36 ` Junio C Hamano
@ 2025-01-29 23:49 ` rsbecker
2025-01-29 23:53 ` Junio C Hamano
0 siblings, 1 reply; 15+ messages in thread
From: rsbecker @ 2025-01-29 23:49 UTC (permalink / raw)
To: 'Junio C Hamano'; +Cc: git
On January 29, 2025 6:37 PM, Junio C Hamano wrote:
><rsbecker@nexbridge.com> writes:
>
>> On January 29, 2025 3:15 PM, Junio C Hamano wrote:
>>><rsbecker@nexbridge.com> writes:
>>>
>>>> The documentation on the Environment Configuration page seems to
>>>> imply that
>>>
>>>Sorry, I am totally lost. Whose documentation on what software are
>>>you
>> referring
>>>to?
>>>
>>> $ git grep -i -e 'environment configuration'
>>>
>>>comes back empty.
>>
>> It is here:
>> https://git-scm.com/book/ms/v2/Git-Internals-Environment-Variables
>
>It is news to me ;-).
>
> $ git grep '[^_]PREFIX[^_]'
>
>does not have any hits in the source, so I do not see how we _could_ be
paying any
>attention to such a thing.
>
>The description seems to originate at
>
> https://github.com/progit2-
>ms/progit2/commit/c24f22d6a6b0572f5756afd64f0c2e9fa6f804fa
>
>that was more than 10 years old. I do not know how reliable the
description there
>is.
Those of us who have written documentation for much of our lives, really
miss accuracy. There are companies where a wrong bit of documentation
is considered as high severity defect. Regardless of that...
t1300-config.sh has the following line in it:
GIT_CONFIG_SYSTEM=write-to-system git config --system config.key value &&
Could it mean that GIT_CONFIG_SYSTEM is actually what I am looking for?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 23:49 ` rsbecker
@ 2025-01-29 23:53 ` Junio C Hamano
2025-01-30 0:07 ` rsbecker
0 siblings, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2025-01-29 23:53 UTC (permalink / raw)
To: rsbecker; +Cc: git
<rsbecker@nexbridge.com> writes:
> Those of us who have written documentation for much of our lives, really
> miss accuracy. There are companies where a wrong bit of documentation
> is considered as high severity defect. Regardless of that...
The association with that "book" and those who hang around here is
that we could contribute corrections to them, as they are open
source and we are friends, but that is about it ;-).
I am reasonably sure that they will appreciate a well researched
pull request (and "well reserached" does not mean "somebody says
this is incorrect" but needs a bit more than that).
THanks.
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [BUG] PREFIX environment variable ignored by git config --system
2025-01-29 23:53 ` Junio C Hamano
@ 2025-01-30 0:07 ` rsbecker
2025-01-30 0:23 ` Junio C Hamano
0 siblings, 1 reply; 15+ messages in thread
From: rsbecker @ 2025-01-30 0:07 UTC (permalink / raw)
To: 'Junio C Hamano'; +Cc: git
On January 29, 2025 6:54 PM, Junio C Hamano wrote:
><rsbecker@nexbridge.com> writes:
>
>> Those of us who have written documentation for much of our lives,
>> really miss accuracy. There are companies where a wrong bit of
>> documentation is considered as high severity defect. Regardless of that...
>
>The association with that "book" and those who hang around here is that we could
>contribute corrections to them, as they are open source and we are friends, but
>that is about it ;-).
>
>I am reasonably sure that they will appreciate a well researched pull request (and
>"well reserached" does not mean "somebody says this is incorrect" but needs a bit
>more than that).
Well, we are all friends here 😉
Be that as it may, the following seems to work:
$ GIT_CONFIG_SYSTEM=/home/randall/etc/gitconfig git config --system --list
fatal: unable to read config file '/home/randall/etc/gitconfig': No such file or directory
This appears to do exactly what I am looking for. When I create that file, git picks
up config values from that file.The question is, is this environment variable actually
sanctioned or is it just coincidence? It does exactly what I am looking for.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [BUG] PREFIX environment variable ignored by git config --system
2025-01-30 0:07 ` rsbecker
@ 2025-01-30 0:23 ` Junio C Hamano
2025-01-30 0:37 ` rsbecker
0 siblings, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2025-01-30 0:23 UTC (permalink / raw)
To: rsbecker; +Cc: git
<rsbecker@nexbridge.com> writes:
> This appears to do exactly what I am looking for. When I create that file, git picks
> up config values from that file.The question is, is this environment variable actually
> sanctioned or is it just coincidence? It does exactly what I am looking for.
How about reading "git config --help"?
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [BUG] PREFIX environment variable ignored by git config --system
2025-01-30 0:23 ` Junio C Hamano
@ 2025-01-30 0:37 ` rsbecker
2025-01-30 19:37 ` Ben Knoble
2025-01-30 21:57 ` Junio C Hamano
0 siblings, 2 replies; 15+ messages in thread
From: rsbecker @ 2025-01-30 0:37 UTC (permalink / raw)
To: 'Junio C Hamano'; +Cc: git
On January 29, 2025 7:24 PM, Junio C Hamano wrote:
><rsbecker@nexbridge.com> writes:
>
>> This appears to do exactly what I am looking for. When I create that
>> file, git picks up config values from that file.The question is, is
>> this environment variable actually sanctioned or is it just coincidence?
It does
>exactly what I am looking for.
>
>How about reading "git config --help"?
Yup. It's there, thanks. So should I figure out how to sync the website with
this
or ignore it?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [BUG] PREFIX environment variable ignored by git config --system
2025-01-30 0:37 ` rsbecker
@ 2025-01-30 19:37 ` Ben Knoble
2025-01-30 21:57 ` Junio C Hamano
1 sibling, 0 replies; 15+ messages in thread
From: Ben Knoble @ 2025-01-30 19:37 UTC (permalink / raw)
To: rsbecker; +Cc: Junio C Hamano, git
> Le 29 janv. 2025 à 19:37, rsbecker@nexbridge.com a écrit :
>
> On January 29, 2025 7:24 PM, Junio C Hamano wrote:
>> <rsbecker@nexbridge.com> writes:
>>
>>> This appears to do exactly what I am looking for. When I create that
>>> file, git picks up config values from that file.The question is, is
>>> this environment variable actually sanctioned or is it just coincidence?
> It does
>> exactly what I am looking for.
>>
>> How about reading "git config --help"?
>
> Yup. It's there, thanks. So should I figure out how to sync the website with
> this
> or ignore it?
I often link less experienced Git users to git-scm.com, so I appreciate if it is fixed in some way.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [BUG] PREFIX environment variable ignored by git config --system
2025-01-30 0:37 ` rsbecker
2025-01-30 19:37 ` Ben Knoble
@ 2025-01-30 21:57 ` Junio C Hamano
1 sibling, 0 replies; 15+ messages in thread
From: Junio C Hamano @ 2025-01-30 21:57 UTC (permalink / raw)
To: rsbecker; +Cc: git
<rsbecker@nexbridge.com> writes:
> On January 29, 2025 7:24 PM, Junio C Hamano wrote:
>><rsbecker@nexbridge.com> writes:
>>
>>> This appears to do exactly what I am looking for. When I create that
>>> file, git picks up config values from that file.The question is, is
>>> this environment variable actually sanctioned or is it just coincidence?
> It does
>>exactly what I am looking for.
>>
>>How about reading "git config --help"?
>
> Yup. It's there, thanks. So should I figure out how to sync the website with
> this
> or ignore it?
It depends on how good a friend you are to them, right ;-)?
https://github.com/progit/progit2/issues?q=is%3Aissue%20state%3Aopen%20PREFIX
seems to say that the issue has not been reported, and doing so
might be a good first step.
We'd probably want a bit of history digging to see if we ever
supported "$PREFIX/etc/gitconfig" before opening that issue, though.
How to phrase the issue would be different between "we used to but
no longer support this since version X" and "we never supported such
a variable". This is a #leftoverbit for those without a lot of
coding skills but patience, being good at using "git blame", and a
good notetaking skills to summarize findings, are needed.
Another good thing to do is to match the environment variables and
their descriptions we have in the output from "git help git" with
that page. We may have acquired a few more of them since that page
of the book was written 10 years ago, for example. This would be a
good #leftoverbit for those without any coding experience but want
to improve the documentation that exists in the overall ecosystem.
Thanks.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-01-30 21:57 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-29 16:34 [BUG] PREFIX environment variable ignored by git config --system rsbecker
2025-01-29 16:41 ` Junio C Hamano
2025-01-29 17:01 ` rsbecker
2025-01-29 20:15 ` Junio C Hamano
2025-01-29 20:33 ` rsbecker
2025-01-29 23:36 ` Junio C Hamano
2025-01-29 23:49 ` rsbecker
2025-01-29 23:53 ` Junio C Hamano
2025-01-30 0:07 ` rsbecker
2025-01-30 0:23 ` Junio C Hamano
2025-01-30 0:37 ` rsbecker
2025-01-30 19:37 ` Ben Knoble
2025-01-30 21:57 ` Junio C Hamano
2025-01-29 18:20 ` rsbecker
2025-01-29 23:48 ` Junio C Hamano
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 NNTP newsgroup(s).