git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr
@ 2013-07-07 22:00 Robin Rosenberg
  2013-07-07 22:21 ` John Keeping
  2013-07-07 22:23 ` Robin Rosenberg
  0 siblings, 2 replies; 5+ messages in thread
From: Robin Rosenberg @ 2013-07-07 22:00 UTC (permalink / raw)
  To: git; +Cc: gitster, Robin Rosenberg

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 Documentation/git-config.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 9ae2508..3198d52 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -107,7 +107,8 @@ See also <<FILES>>.
 
 --system::
 	For writing options: write to system-wide $(prefix)/etc/gitconfig
-	rather than the repository .git/config.
+	rather than the repository .git/config. However, $(prefix) is /usr
+	then /etc/gitconfig is used.
 +
 For reading options: read only from system-wide $(prefix)/etc/gitconfig
 rather than from all available files.
@@ -214,7 +215,8 @@ $XDG_CONFIG_HOME/git/config::
 	file was added fairly recently.
 
 $(prefix)/etc/gitconfig::
-	System-wide configuration file.
+	System-wide configuration file, unless $(prefix) is /usr. In the
+	latter case /etc/gitconfig is used.
 
 If no further options are given, all reading options will read all of these
 files that are available. If the global or the system-wide configuration
-- 
1.8.3.rc0.19.g7e6a0cc

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr
  2013-07-07 22:00 [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr Robin Rosenberg
@ 2013-07-07 22:21 ` John Keeping
  2013-07-07 22:32   ` Robin Rosenberg
  2013-07-07 22:23 ` Robin Rosenberg
  1 sibling, 1 reply; 5+ messages in thread
From: John Keeping @ 2013-07-07 22:21 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git, gitster

On Mon, Jul 08, 2013 at 12:00:02AM +0200, Robin Rosenberg wrote:
> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
> ---
>  Documentation/git-config.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index 9ae2508..3198d52 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -107,7 +107,8 @@ See also <<FILES>>.
>  
>  --system::
>  	For writing options: write to system-wide $(prefix)/etc/gitconfig
> -	rather than the repository .git/config.
> +	rather than the repository .git/config. However, $(prefix) is /usr
> +	then /etc/gitconfig is used.

That's a build time condition, not something that's decided at runtime
so I'm not sure that this logic belongs in the user facing
documentation.  The technically correct change would be to use
"$(sysconfdir)/gitconfig" but I think that will just confuse users more.

Since we have a build step for the documentation, I wonder if it's
possible to replace these with the correct directory at build time.

>  +
>  For reading options: read only from system-wide $(prefix)/etc/gitconfig
>  rather than from all available files.
> @@ -214,7 +215,8 @@ $XDG_CONFIG_HOME/git/config::
>  	file was added fairly recently.
>  
>  $(prefix)/etc/gitconfig::
> -	System-wide configuration file.
> +	System-wide configuration file, unless $(prefix) is /usr. In the
> +	latter case /etc/gitconfig is used.
>  
>  If no further options are given, all reading options will read all of these
>  files that are available. If the global or the system-wide configuration
> -- 
> 1.8.3.rc0.19.g7e6a0cc

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr
  2013-07-07 22:00 [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr Robin Rosenberg
  2013-07-07 22:21 ` John Keeping
@ 2013-07-07 22:23 ` Robin Rosenberg
  2013-07-07 22:47   ` Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: Robin Rosenberg @ 2013-07-07 22:23 UTC (permalink / raw)
  To: git; +Cc: gitster


I guess this isn't true either. Anyone has a better way of
specifiying where the system wide config file is read from,
or a user-parseable definition of $(prefix) ?

-- robin

----- Ursprungligt meddelande -----
> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
> ---
>  Documentation/git-config.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/git-config.txt
> b/Documentation/git-config.txt
> index 9ae2508..3198d52 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -107,7 +107,8 @@ See also <<FILES>>.
>  
>  --system::
>  	For writing options: write to system-wide $(prefix)/etc/gitconfig
> -	rather than the repository .git/config.
> +	rather than the repository .git/config. However, $(prefix) is /usr
> +	then /etc/gitconfig is used.
>  +
>  For reading options: read only from system-wide
>  $(prefix)/etc/gitconfig
>  rather than from all available files.
> @@ -214,7 +215,8 @@ $XDG_CONFIG_HOME/git/config::
>  	file was added fairly recently.
>  
>  $(prefix)/etc/gitconfig::
> -	System-wide configuration file.
> +	System-wide configuration file, unless $(prefix) is /usr. In the
> +	latter case /etc/gitconfig is used.
>  
>  If no further options are given, all reading options will read all
>  of these
>  files that are available. If the global or the system-wide
>  configuration
> --
> 1.8.3.rc0.19.g7e6a0cc
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr
  2013-07-07 22:21 ` John Keeping
@ 2013-07-07 22:32   ` Robin Rosenberg
  0 siblings, 0 replies; 5+ messages in thread
From: Robin Rosenberg @ 2013-07-07 22:32 UTC (permalink / raw)
  To: John Keeping; +Cc: git, gitster, Shawn Pearce



----- Ursprungligt meddelande -----
> On Mon, Jul 08, 2013 at 12:00:02AM +0200, Robin Rosenberg wrote:
> > Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
> > ---
> >  Documentation/git-config.txt | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/git-config.txt
> > b/Documentation/git-config.txt
> > index 9ae2508..3198d52 100644
> > --- a/Documentation/git-config.txt
> > +++ b/Documentation/git-config.txt
> > @@ -107,7 +107,8 @@ See also <<FILES>>.
> >  
> >  --system::
> >  	For writing options: write to system-wide $(prefix)/etc/gitconfig
> > -	rather than the repository .git/config.
> > +	rather than the repository .git/config. However, $(prefix) is
> > /usr
> > +	then /etc/gitconfig is used.
> 
> That's a build time condition, not something that's decided at
> runtime
> so I'm not sure that this logic belongs in the user facing
> documentation.  The technically correct change would be to use
> "$(sysconfdir)/gitconfig" but I think that will just confuse users
> more.
> 
> Since we have a build step for the documentation, I wonder if it's
> possible to replace these with the correct directory at build time.

Might work for documentation. I'd like a run-time variant for my
particular problem, but the one I found now, e.g. git rev-parse --show-prefix"
does not work in the general case. I want to tell JGit where the system
wide configuration file is, even before we have a git repository.

-- robin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr
  2013-07-07 22:23 ` Robin Rosenberg
@ 2013-07-07 22:47   ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2013-07-07 22:47 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git

Robin Rosenberg <robin.rosenberg@dewire.com> writes:

> I guess this isn't true either. Anyone has a better way of
> specifiying where the system wide config file is read from,
> or a user-parseable definition of $(prefix) ?

	... the system-wide configuration file (typically
	/etc/gitconfig), rather than the repository specific
	configuration file (.git/config)

should be sufficient.

>
> -- robin
>
> ----- Ursprungligt meddelande -----
>> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
>> ---
>>  Documentation/git-config.txt | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>> 
>> diff --git a/Documentation/git-config.txt
>> b/Documentation/git-config.txt
>> index 9ae2508..3198d52 100644
>> --- a/Documentation/git-config.txt
>> +++ b/Documentation/git-config.txt
>> @@ -107,7 +107,8 @@ See also <<FILES>>.
>>  
>>  --system::
>>  	For writing options: write to system-wide $(prefix)/etc/gitconfig
>> -	rather than the repository .git/config.
>> +	rather than the repository .git/config. However, $(prefix) is /usr
>> +	then /etc/gitconfig is used.
>>  +
>>  For reading options: read only from system-wide
>>  $(prefix)/etc/gitconfig
>>  rather than from all available files.
>> @@ -214,7 +215,8 @@ $XDG_CONFIG_HOME/git/config::
>>  	file was added fairly recently.
>>  
>>  $(prefix)/etc/gitconfig::
>> -	System-wide configuration file.
>> +	System-wide configuration file, unless $(prefix) is /usr. In the
>> +	latter case /etc/gitconfig is used.
>>  
>>  If no further options are given, all reading options will read all
>>  of these
>>  files that are available. If the global or the system-wide
>>  configuration
>> --
>> 1.8.3.rc0.19.g7e6a0cc
>> 
>> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-07 22:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-07 22:00 [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr Robin Rosenberg
2013-07-07 22:21 ` John Keeping
2013-07-07 22:32   ` Robin Rosenberg
2013-07-07 22:23 ` Robin Rosenberg
2013-07-07 22:47   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).