From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Darren Cook <darren@dcook.org>
Cc: git@vger.kernel.org
Subject: Re: Bug Report: git add
Date: Wed, 6 Apr 2011 11:22:04 +0530 [thread overview]
Message-ID: <20110406055200.GA12547@kytes> (raw)
In-Reply-To: <4D9BA35E.6040204@dcook.org>
Hi Darren,
Darren Cook writes:
> (Apologies if there is a proper place to report bugs; but I could not
> find one.)
There is no bugtracker, so this is the right place to report it.
Thanks for reporting.
> PROBLEM: "git add" adds sub-directories without checking to see if there
> is already a git repository already there.
>
> WHY BAD: This causes files to be in two repositories (leading to a mess
> if you don't notice for a while...)
>
> ONE SOLUTION: When adding files from a directory (except root of the
> repository, of course) look for a .git subdirectory, and complain if
> found. Allow --force to override this.
This is a good suggestion. It already has a way to handle gitlinks
(for submodules), so this seems like a very reasonable feature.
> MORE SOPHISTICATED:
> 1. Offer to merge in all that history, followed by removing that old
> .git subdirectory.
Hm, I don't like this one -- there are too many ways to "merge" the
history, and I can't see a sane default (or even a sane subset of
defaults).
> 2. Look inside the .git subdirectory to see if the file being added is
> actually under control there. If not, no need to complain.
I don't like this one either. Tangling up two Git repositories like
this is not a good idea -- the user should use submodules or similar.
Next steps: Me (or someone else who has the time) will post a patch
fixing this shortly.
-- Ram
next prev parent reply other threads:[~2011-04-06 5:53 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 [this message]
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
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=20110406055200.GA12547@kytes \
--to=artagnon@gmail.com \
--cc=darren@dcook.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).