Re: [bug] git-add won't add foo/.git/bar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 25 Mar 2008, Michael Gebetsroither wrote:

* Junio C Hamano <gitster@xxxxxxxxx> wrote:
Julian Phillips <julian@xxxxxxxxxxxxxxxxx> writes:
On Tue, 25 Mar 2008, Michael Gebetsroither wrote:

% git-add -f foo/.git/bar
fatal: unable to add foo/.git/bar to index

Also it is false that we should only care about the first one.  Think
submodules.

Would it be possible to allow it with git-add -f or does that break to
many cases?

It would be possible, but Junio has convinced me that it wouldn't really be wise. Inside the working tree .git is a special name - end of story.

It would be relatively easy to change the check that prevents you from doing it - but this wouldn't stop any of the nasty things that could ensue. You might never have a problem with a simple layout, but it could cause mayhem for others with more complicated layouts.

(I've never used any of the more complicated layouts either, which is why I didn't initially see the problems ... ho hum)

--
Julian

 ---
Hlade's Law:
	If you have a difficult task, give it to a lazy person --
	they will find an easier way to do it.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux