From: Barry Warsaw <barry@python.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: GIT_CEILING_DIRECTORY
Date: Wed, 9 Mar 2016 12:57:04 -0500 [thread overview]
Message-ID: <20160309125704.162be49c@subdivisions.wooz.org> (raw)
In-Reply-To: <xmqqshzzimpo.fsf@gitster.mtv.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]
On Mar 09, 2016, at 09:29 AM, Junio C Hamano wrote:
>Let me understand the use case. You have $HOME/.git that governs
>everything under $HOME, but there are parts of $HOME/, such as
>$HOME/projects/*, that will never be controled by $HOME/.git?
Correct.
>Two obvious reactions are:
>
> - hopefully $HOME/.gitignore covers these non-git parts by having
> entries like '/projects/'; this should not affect the behaviour
> of CEILING though.
Correct. In this case, $HOME/.gitignore has `projects` so `git status`
etc. in $HOME does the right thing.
> - typing "git status" inside $HOME/projects/ does not make much
> sense in the first place.
True, and normally I wouldn't do this explicitly, but it comes up because I
have a bash prompt that shows me the status of the current directory
($GIT_PS_*) so even when I just cd to ~/projects I see status for $HOME.
>I _think_ the "are we in a Git-managed working tree and if so, then
>where is the .git directory?" discovery works like this:
[...]
>So setting $HOME/projects as one of the elements in the CEILING list
>would not stop us going up if you are actually at $HOME/projects,
>but we would stop if you started from $HOME/projects/python.
And indeed, that works great.
>This somehow sounds a bit inconsistent to me, but I say "a bit
>inconsistent" because "Why do we give different answer to 'is
>$HOME/projects/python governed by $HOME/.git?' depending on where we
>start the discovery process?" is a non-argument (i.e. that is not
>the question CEILING is answering).
>
>I have a feeling that we must have done that for a reason. It may
>be interesting to see what breaks in t1504 if the above logic is
>updated to stop when you start at a CEILING (unlike the current code
>where it stops only when you start below a CEILING).
That would be interesting; it seems like it would solve my use case.
Cheers,
-Barry
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-03-09 17:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 16:02 GIT_CEILING_DIRECTORY Barry Warsaw
2016-03-09 17:29 ` GIT_CEILING_DIRECTORY Junio C Hamano
2016-03-09 17:57 ` Barry Warsaw [this message]
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=20160309125704.162be49c@subdivisions.wooz.org \
--to=barry@python.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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).