All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Hilco Wijbenga <hilco.wijbenga@gmail.com>
Cc: nguyenhu@minatec.inpg.fr, git@vger.kernel.org,
	matthieu.moy@grenoble-inp.fr,
	"Valentin DUPERRAY" <Valentin.Duperray@phelma.grenoble-inp.fr>,
	"Franck JONAS" <Franck.Jonas@phelma.grenoble-inp.fr>,
	"Lucien KONG" <Lucien.Kong@phelma.grenoble-inp.fr>,
	"Thomas NGUY" <Thomas.Nguy@phelma.grenoble-inp.fr>,
	"Huynh Khoi Nguyen NGUYEN"
	<Huynh-Khoi-Nguyen.Nguyen@phelma.grenoble-inp.fr>,
	"Jeff King" <peff@peff.net>,
	"Nguyễn Thái Ngọc" <pclouds@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: [PATCH] config doc: remove confusion about relative GIT_DIR from FILES section
Date: Fri, 25 May 2012 13:12:04 -0500	[thread overview]
Message-ID: <20120525181204.GA4491@burratino> (raw)
In-Reply-To: <CAE1pOi3qSEY=Dj-Fqj+=anULVmCdsm72_k+B0SpdGiCO3u7L9A@mail.gmail.com>

From the FILES section of the git-config(1) manual:

	$GIT_DIR/config::
		Repository specific configuration file. (The filename is
		of course relative to the repository root, not the working
		directory.)

That's confusing because $GIT_DIR really is relative to the working
directory.

	$ GIT_DIR=.git GIT_EDITOR='pwd; echo editing'
	$ export GIT_DIR GIT_EDITOR
	$ git config --edit --local
	/home/jrn/src/git/Documentation
	editing .git/config

It turns out that the comment is a remnant from older days when the
heading said ".git/config" (which is indeed relative to the top of the
worktree).

It was only when the heading was changed to refer more precisely to
<git dir>/config (see v1.5.3.2~18, AsciiDoc tweak to avoid leading
dot, 2007-09-14) that the parenthesis stopped making sense.  Remove
it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Hilco Wijbenga wrote:
> On 25 May 2012 10:42, Jonathan Nieder <jrnieder@gmail.com> wrote:

>> Regarding $GIT_DIR/config, it says "The filename is of course relative
>> to the repository root, not the working directory.".  Is this out of
>> date?  (Cc-ing Peff and Duy.)
>
> I'm sure it's not.

You're right --- the current wording never made sense and is not an
example of accurate documentation going stale with later behavior
changes as I had suspected.  Sorry for the noise.

Thanks,
Jonathan

 Documentation/git-config.txt |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 3f5d216a..d9463cb3 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -198,9 +198,7 @@ If not set explicitly with '--file', there are three files where
 'git config' will search for configuration options:
 
 $GIT_DIR/config::
-	Repository specific configuration file. (The filename is
-	of course relative to the repository root, not the working
-	directory.)
+	Repository specific configuration file.
 
 ~/.gitconfig::
 	User-specific configuration file. Also called "global"
-- 
1.7.10

  reply	other threads:[~2012-05-25 18:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 16:15 [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig nguyenhu
2012-05-25 17:01 ` Jonathan Nieder
2012-05-25 17:29   ` Matthieu Moy
2012-05-25 17:44     ` Jonathan Nieder
2012-05-25 17:31 ` Hilco Wijbenga
2012-05-25 17:42   ` Jonathan Nieder
2012-05-25 17:47     ` Hilco Wijbenga
2012-05-25 18:12       ` Jonathan Nieder [this message]
2012-05-25 20:06         ` [PATCH] config doc: remove confusion about relative GIT_DIR from FILES section Jeff King
2012-05-25 18:20       ` [RFC] Possibility to choose ~/.config/git/config instead of ~/.gitconfig Junio C Hamano
2012-05-25 17:54     ` Matthieu Moy
2012-05-25 20:11       ` Jeff King
2012-05-25 18:13   ` Junio C Hamano
2012-05-25 18:25     ` Jonathan Nieder
2012-05-25 18:34       ` Junio C Hamano
2012-05-25 18:44         ` Jonathan Nieder
2012-05-25 18:58           ` Junio C Hamano
2012-05-25 19:13             ` Matthieu Moy
2012-05-25 19:17             ` Jonathan Nieder
2012-05-25 19:29               ` Matthieu Moy
2012-05-25 19:35                 ` Jonathan Nieder
2012-05-25 19:37                   ` Jonathan Nieder
2012-05-25 19:39                   ` Matthieu Moy
2012-05-25 19:01           ` Matthieu Moy
2012-05-26 10:45 ` Felipe Contreras
2012-05-26 10:59   ` Heiko Voigt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120525181204.GA4491@burratino \
    --to=jrnieder@gmail.com \
    --cc=Franck.Jonas@phelma.grenoble-inp.fr \
    --cc=Huynh-Khoi-Nguyen.Nguyen@phelma.grenoble-inp.fr \
    --cc=Lucien.Kong@phelma.grenoble-inp.fr \
    --cc=Thomas.Nguy@phelma.grenoble-inp.fr \
    --cc=Valentin.Duperray@phelma.grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hilco.wijbenga@gmail.com \
    --cc=matthieu.moy@grenoble-inp.fr \
    --cc=nguyenhu@minatec.inpg.fr \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.