* /etc/git/
@ 2024-12-26 17:10 Alejandro Colomar
2024-12-26 17:20 ` /etc/git/ rsbecker
0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Colomar @ 2024-12-26 17:10 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
Hi!
I'd like to have all system-wide configuration under a single directory.
What do you think of adding /etc/git/, and reading a 'config', 'ignore',
and 'attributes' files from there? /etc/gitconfig and
/etc/gitattributes isn't very clean.
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: /etc/git/
2024-12-26 17:10 /etc/git/ Alejandro Colomar
@ 2024-12-26 17:20 ` rsbecker
2024-12-26 20:41 ` /etc/git/ Alejandro Colomar
0 siblings, 1 reply; 5+ messages in thread
From: rsbecker @ 2024-12-26 17:20 UTC (permalink / raw)
To: 'Alejandro Colomar', git
On December 26, 2024 12:11 PM, Alejandro Colomar wrote:
>I'd like to have all system-wide configuration under a single directory.
>What do you think of adding /etc/git/, and reading a 'config', 'ignore', and
>'attributes' files from there? /etc/gitconfig and /etc/gitattributes isn't very clean.
Have a look at GIT_CONFIG_SYSTEM documented in https://git-scm.com/docs/git
and let us know whether this might work for you.
--Randall
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /etc/git/
2024-12-26 17:20 ` /etc/git/ rsbecker
@ 2024-12-26 20:41 ` Alejandro Colomar
2024-12-26 20:46 ` /etc/git/ rsbecker
0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Colomar @ 2024-12-26 20:41 UTC (permalink / raw)
To: rsbecker; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]
Hi Randall,
On Thu, Dec 26, 2024 at 12:20:34PM -0500, rsbecker@nexbridge.com wrote:
> On December 26, 2024 12:11 PM, Alejandro Colomar wrote:
> >I'd like to have all system-wide configuration under a single directory.
> >What do you think of adding /etc/git/, and reading a 'config', 'ignore', and
> >'attributes' files from there? /etc/gitconfig and /etc/gitattributes isn't very clean.
>
> Have a look at GIT_CONFIG_SYSTEM documented in https://git-scm.com/docs/git
> and let us know whether this might work for you.
That's a workaround, which would involve appending some line in
/etc/bash.bashrc or somewhere similar. In the end, the git
configuration would be spread and unorganized, just in a different way.
In fact, I think I prefer having several /etc/gitsomething files than
having a dir and then having to clutter the system-wide bashrc.
So, I prefer /etc/gitconfig over /etc/git/config + GIT_CONFIG_SYSTEM,
but I prefer /etc/git/config over both.
Have a lovely night!
Alex
>
> --Randall
>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: /etc/git/
2024-12-26 20:41 ` /etc/git/ Alejandro Colomar
@ 2024-12-26 20:46 ` rsbecker
2024-12-31 21:03 ` /etc/git/ Alejandro Colomar
0 siblings, 1 reply; 5+ messages in thread
From: rsbecker @ 2024-12-26 20:46 UTC (permalink / raw)
To: 'Alejandro Colomar'; +Cc: git
On December 26, 2024 3:42 PM, Alejandro Colomar wrote:
>On Thu, Dec 26, 2024 at 12:20:34PM -0500, rsbecker@nexbridge.com wrote:
>> On December 26, 2024 12:11 PM, Alejandro Colomar wrote:
>> >I'd like to have all system-wide configuration under a single directory.
>> >What do you think of adding /etc/git/, and reading a 'config',
>> >'ignore', and 'attributes' files from there? /etc/gitconfig and /etc/gitattributes
>isn't very clean.
>>
>> Have a look at GIT_CONFIG_SYSTEM documented in
>> https://git-scm.com/docs/git and let us know whether this might work for you.
>
>That's a workaround, which would involve appending some line in /etc/bash.bashrc
>or somewhere similar. In the end, the git configuration would be spread and
>unorganized, just in a different way.
>In fact, I think I prefer having several /etc/gitsomething files than having a dir and
>then having to clutter the system-wide bashrc.
>
>So, I prefer /etc/gitconfig over /etc/git/config + GIT_CONFIG_SYSTEM, but I prefer
>/etc/git/config over both.
One possible thing is to have your central git config, wherever you put it, use [include] sections.
These allow flexibility to pull in relevant configurations depending on the qualification
of the include. Maybe something else to think about.
An enhancement like this is high impact and would touch a fair amount of code. It is not
Just for --system, but --global and --local also. The semantic of specifying and resolving
Configurations and attributes (inherited in repositories) are significant.
--Randall
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /etc/git/
2024-12-26 20:46 ` /etc/git/ rsbecker
@ 2024-12-31 21:03 ` Alejandro Colomar
0 siblings, 0 replies; 5+ messages in thread
From: Alejandro Colomar @ 2024-12-31 21:03 UTC (permalink / raw)
To: rsbecker; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
Hi Randall,
On Thu, Dec 26, 2024 at 03:46:29PM -0500, rsbecker@nexbridge.com wrote:
> >So, I prefer /etc/gitconfig over /etc/git/config + GIT_CONFIG_SYSTEM, but I prefer
> >/etc/git/config over both.
>
> One possible thing is to have your central git config, wherever you put it, use [include] sections.
> These allow flexibility to pull in relevant configurations depending on the qualification
> of the include. Maybe something else to think about.
I had forgotten about core.attributesFile and core.excludesFile. I now
have /etc/gitconfig, and then everything else under /etc/git/, and have
[core]
attributesFile = /etc/git/attributes
excludesFile = /etc/git/ignore
This seems quite decent.
Have a lovely new year!
Alex
>
> An enhancement like this is high impact and would touch a fair amount of code. It is not
> Just for --system, but --global and --local also. The semantic of specifying and resolving
> Configurations and attributes (inherited in repositories) are significant.
>
> --Randall
>
>
>
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-31 21:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-26 17:10 /etc/git/ Alejandro Colomar
2024-12-26 17:20 ` /etc/git/ rsbecker
2024-12-26 20:41 ` /etc/git/ Alejandro Colomar
2024-12-26 20:46 ` /etc/git/ rsbecker
2024-12-31 21:03 ` /etc/git/ Alejandro Colomar
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).