From: Jonathan Nieder <jrnieder@gmail.com>
To: Pasha Bolokhov <pasha.bolokhov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Problem: staging of an alternative repository
Date: Wed, 30 Apr 2014 14:35:45 -0700 [thread overview]
Message-ID: <20140430213545.GV9218@google.com> (raw)
In-Reply-To: <CAKpPgveXqraM4bXb499mJm5Ls+EinihfEJ6VgOFikC0_Qp8iTA@mail.gmail.com>
Hi Pavel,
Pasha Bolokhov wrote:
> It turns out Git treats the directory '.git' differently enough
> from everything else. That may be ok,
Yeah, it's intended.
[...]
> if you supply a different repository base name, say, '.git_new',
> by either setting GIT_DIR or using the '--git-dir' option, Git 'add'
> will not make any exception for it and think of it as a new (weird)
> directory.
Yep, a git repository metadata directory named .git_new is not special
in any way and you can use "git add" to track it if you want (for
example to add a testcase).
[...]
> Now I know, the '--git-dir' option may usually be meant to use
> when the repository is somewhere outside of the work tree, and such a
> problem would not arise. And even if it is inside, sure enough, you
> can add this '.git_new' to the ignores or excludes. But is this really
> what you expect?
I think it's more that it never came up. Excluding the current
$GIT_DIR from what "git add" can add (on top of the current rule of
excluding all instances of ".git") seems like a sensible change,
assuming it can be done without hurting the code too much. ;-)
But as you note, you are not using $GIT_DIR the way it was intended to
be used.
Thanks and hope that helps,
Jonathan
next prev parent reply other threads:[~2014-04-30 21:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 21:22 Problem: staging of an alternative repository Pasha Bolokhov
2014-04-30 21:35 ` Jonathan Nieder [this message]
2014-05-02 5:23 ` Pasha Bolokhov
2014-05-02 6:20 ` Duy Nguyen
2014-05-07 20:51 ` Pasha Bolokhov
2014-05-17 16:31 ` Pasha Bolokhov
2014-05-19 10:05 ` Duy Nguyen
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=20140430213545.GV9218@google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=pasha.bolokhov@gmail.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).