git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barry Warsaw <barry@python.org>
To: git@vger.kernel.org
Subject: GIT_CEILING_DIRECTORY
Date: Wed, 9 Mar 2016 11:02:42 -0500	[thread overview]
Message-ID: <20160309110242.04d8d480@anarchist.wooz.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1123 bytes --]

I put my home directory under git (recently converted from bzr), but since I
have some subdirectories under $HOME that are not under git (and some that
are) I want to stop e.g. `git status` from traversing up into $HOME.  For
example, I have a ~/projects directory with lots of subdirectories so when I'm
in e.g. my CPython Mercurial checkout (~/projects/python), I don't want git to
go higher than ~/projects

GIT_CEILING_DIRECTORIES seems like exactly the thing I want, so I set it to
::$HOME/projects and this works great... unless I'm actually in ~/projects in
which case `git status` shows me the status of the $HOME repository.

I tried setting this to just $HOME, but that has the undesired side-effect of
blocking $HOME status when I'm in a subdirectory that *is* part of the base
repo, e.g. ~/env.  IOW, with GIT_CEILING_DIRECTORIES=$HOME and I cd into
~/env, I don't get any status.

So I'm wondering whether this should be considered a bug in git, or if there's
some other way to handle this corner case, or whether it's working as intended
and I just have to live with it.

Cheers,
-Barry

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

             reply	other threads:[~2016-03-09 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 16:02 Barry Warsaw [this message]
2016-03-09 17:29 ` GIT_CEILING_DIRECTORY Junio C Hamano
2016-03-09 17:57   ` GIT_CEILING_DIRECTORY Barry Warsaw

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=20160309110242.04d8d480@anarchist.wooz.org \
    --to=barry@python.org \
    --cc=git@vger.kernel.org \
    /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 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 NNTP newsgroup(s).