From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Darren Cook <darren@dcook.org>, git@vger.kernel.org
Subject: Re: Bug Report: git add
Date: Wed, 06 Apr 2011 18:09:37 -0700 [thread overview]
Message-ID: <7vbp0ihnou.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110407005750.GC28813@sigill.intra.peff.net> (Jeff King's message of "Wed, 6 Apr 2011 20:57:50 -0400")
Jeff King <peff@peff.net> writes:
>> mkdir settings
>> cd settings
>> git init
>> touch x
>> ...
>> cd ..
>> git init
>> git add settings/
>> (should complain)
>
> If you do "git add settings" (without the slash) it will add the
> repository as a submodule. Which is not the behavior you asked for, but
> is at least reasonable. So the real bug seems to me the fact that "git
> add settings/" and "git add settings" behave differently.
Also if "git add settings/x" does not complain, that would be a bigger
issue, whose solution would probably be in the same area.
It may finally be the time to rename has_symlink_leading_path() function
and enhance its feature. It happens to check leading symlinks, but its
real purpose is to check if the given path is outside the working tree,
and a path that is in a subdirectory with its own .git repository
certainly is outside the working tree. The callers should be able to say
what check is being asked for by naming the _purpose_ of the test ("is
this path outside the working tree?"), not the mechanics ("does the path
have a symlink that points outside?").
next prev parent reply other threads:[~2011-04-07 1:09 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
2011-04-11 18:20 ` Jeff King
2011-04-07 0:57 ` Jeff King
2011-04-07 1:09 ` Junio C Hamano [this message]
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
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=7vbp0ihnou.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=darren@dcook.org \
--cc=git@vger.kernel.org \
--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.
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).