git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Mike Hommey <mh@glandium.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Thorsten von Eicken <tve@rightscale.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: git status doesn't ignore GIT_DIR directory?
Date: Sat, 23 May 2015 18:42:57 +0700	[thread overview]
Message-ID: <CACsJy8C2LHVrZ-MPupz2_BbE-5m7_fA7qK5HdUa9GR30y8YNPw@mail.gmail.com> (raw)
In-Reply-To: <20150523053900.GA2364@glandium.org>

On Sat, May 23, 2015 at 12:39 PM, Mike Hommey <mh@glandium.org> wrote:
> On Sat, May 23, 2015 at 09:22:56AM +0700, Duy Nguyen wrote:
>> --- 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)

If $GIT_DIR points to somewhere inside worktree, ".git" exactly (it's
strcmp(), not ends_with()) is the only exception. If it points outside
worktree, the directory name could be anything.
-- 
Duy

  reply	other threads:[~2015-05-23 11:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-23  1:03 git status doesn't ignore GIT_DIR directory? Thorsten von Eicken
2015-05-23  2:03 ` Junio C Hamano
2015-05-23  2:22   ` Duy Nguyen
2015-05-23  4:41     ` Thorsten von Eicken
2015-05-23 11:53       ` Duy Nguyen
2015-05-23  5:39     ` Mike Hommey
2015-05-23 11:42       ` Duy Nguyen [this message]
2015-05-23 16:54       ` Junio C Hamano
2015-05-23 17:00         ` Junio C Hamano
2015-05-23 17:39           ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CACsJy8C2LHVrZ-MPupz2_BbE-5m7_fA7qK5HdUa9GR30y8YNPw@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mh@glandium.org \
    --cc=tve@rightscale.com \
    /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.
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).