Re: git status doesn't ignore GIT_DIR directory?

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

 



On Sat, May 23, 2015 at 09:22:56AM +0700, Duy Nguyen wrote:
> On Fri, May 22, 2015 at 07:03:48PM -0700, Junio C Hamano wrote:
> > As far as I know, GIT_DIR was prepared as a mechanism to point at
> > another .git directory that does not live inside the working tree, not
> > as a mechanism to rename it to arbitrary name. E.g.
> > 
> >  $ git init
> >  $ mv .git .svn
> >  $ GIT_DIR=$(pwd)/.svn ; export GIT_DIR
> > 
> > is not expected to work.
> 
> This is not the first time we get this report. Perhaps we should
> document it.
> 
> -- 8< --
> Subject: git.txt: mention the special name ".git" in GIT_DIR
> 
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
> diff --git a/Documentation/git.txt b/Documentation/git.txt
> index 90c5f37..91d6dd2 100644
> --- a/Documentation/git.txt
> +++ b/Documentation/git.txt
> @@ -691,6 +691,9 @@ Git so take care if using Cogito etc.
>  	specifies a path to use instead of the default `.git`
>  	for the base of the repository.
>  	The '--git-dir' command-line option also sets this value.
> ++
> +Note that if GIT_DIR is set explicitly to a directory inside working
> +tree, the directory name must be ".git".

Isn't the requirement that it _ends_ with ".git" (that is,
GIT_DIR=/path/to/foo.git would work)

Mike
--
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]