From: Junio C Hamano <gitster@pobox.com>
To: Jakub Narebski <jnareb@gmail.com>, Jeff King <peff@peff.net>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
Darren Cook <darren@dcook.org>,
git@vger.kernel.org
Subject: Re: Bug Report: git add
Date: Mon, 11 Apr 2011 10:55:31 -0700 [thread overview]
Message-ID: <7v1v18y8oc.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <m31v1a4keq.fsf@localhost.localdomain> (Jakub Narebski's message of "Sun, 10 Apr 2011 00:48:49 -0700 (PDT)")
Jakub Narebski <jnareb@gmail.com> writes:
> Currently I have TODO file in gitweb/ subdirectory, which is stored in
> gitweb/.git repository. Still it doesn't prevent me from "git add"-ing
> e.g. 'gitweb/gitweb.perl' to git repository itself.
I would have to say that it is somewhat a sensible thing to want to do
from an individual contributor's point of view to keep track of personal
notes on a subpart of a project in a separate repository.
It however directly contradicts with the approach I suggested earlier,
which resulted in Peff's patch
http://thread.gmane.org/gmane.comp.version-control.git/170937/focus=171040
and will be broken, I think.
We could skip the check for a directory D where there already is a path
D/P (where P has one or more path components, e.g. "file", "subdir/file")
tracked and check only if D/.git is a git directory when adding path in D
if there is no other D/P is tracked (and perhaps require --force), if we
really wanted to keep supporting what you are doing. But I do not think
it is worth doing, considering the possibility that such a loophole would
lead to even more confusing behaviour to new users.
If there is an equally easy way of keeping track of personal notes in a
subpart of a larger project like you do, without having an unrelated .git/
directory in a worktree that is controlled by a project and mixing files
in a single directory in such a way that some belong to the main project
while others belong to the unrelated "personal notes" project, I would
rather see us recommend such an approach, and declare that your use case
is forbidden, as it would give us a far easier to explain rule: "files in
one directory can be controlled only by one .git/ directory".
Besides, if the subpart of the project you are interested in and want to
have personal notes about were at the top-level of the project, you
wouldn't be using the same workflow as you currently do, as you cannot
obviously have two .git/ at the same level.
next prev parent reply other threads:[~2011-04-11 17:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-05 23:18 Bug Report: git add Darren Cook
2011-04-06 5:52 ` Ramkumar Ramachandra
2011-04-10 7:48 ` Jakub Narebski
2011-04-10 8:29 ` Ramkumar Ramachandra
2011-04-11 17:55 ` Junio C Hamano [this message]
2011-04-11 18:20 ` Jeff King
2011-04-07 0:57 ` Jeff King
2011-04-07 1:09 ` Junio C Hamano
2011-04-07 1:12 ` Jeff King
2011-04-07 1:48 ` Jeff King
2011-04-07 7:28 ` Junio C Hamano
2011-04-08 19:15 ` Jeff King
2011-04-08 19:46 ` Jeff King
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=7v1v18y8oc.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=artagnon@gmail.com \
--cc=darren@dcook.org \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=peff@peff.net \
/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).