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

Re: [PATCH] Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Jul 7, 2013, 22:32 UTC
Message-ID
<1436467098.1055670.1373236326672.JavaMail.root@dewire.com>
In-Reply-To
<20130707222152.GV9161@serenity.lan>
----- Ursprungligt meddelande -----
Show 29 quoted lines
> 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
Previous: John KeepingNext: Robin Rosenberg
Message 3 of 5 in “Documentation: finding $(prefix)/etc/gitconfig when prefix = /usr”
  1. Documentation: finding $(prefix)/etc/gitconfig when prefix = /usrRobin Rosenberg, Jul 7, 2013
  2. John KeepingJul 7, 2013
  3. Robin RosenbergJul 7, 2013
  4. Robin RosenbergJul 7, 2013
  5. Junio C HamanoJul 7, 2013

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.