Re: [PATCH] config doc: remove confusion about relative GIT_DIR from FILES section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 25, 2012 at 01:12:04PM -0500, Jonathan Nieder wrote:

> 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.

Thanks for digging in the history for the answer.

> 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"

This makes a lot more sense to me.

Acked-by: Jeff King <peff@xxxxxxxx>

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]