From: Linus Torvalds Date: Tue, 18 Oct 2005 23:21:41 GMT Subject: Re: [PATCH] git-daemon extra paranoia Message-ID: In-Reply-To: <7v64ruo31i.fsf@assigned-by-dhcp.cox.net> On Tue, 18 Oct 2005, Junio C Hamano wrote: > > Wouldn't having /home/linux-2.6/.git/ repository with > /home/linux-2.6/ working tree be good enough for that? Instead > of doing "find / -type d -name '*.git'" you could do "find / > -type d -name .git" for automated tasks. In this case, yes. But In a mixed environment where you might have "bare" repositories, you want to have "reponame.git" as the repository name. So with the rule that (a) try to first append ".git" and (b) then, after a successful chdir, try to go in one more level, you can handle both types, without ever having to care whether it's checked-out or not. And for secondary projects (where git isn't necessarily the primary source control method), I actually use the "project.git" naming just to make it obvious that this is the "gitified" version of the project. For example, I keep both my private uemacs and pine source trees as git repositories these days, and I have them under "~/src/uemacs.git/" and "~/src/pine.git/" even though they are checked out and thus actually have another ".git" inside of them. Linus