git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-daemon extra paranoia

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 18, 2005, 23:21 UTC
Message-ID
<Pine.LNX.4.64.0510181616500.3369@g5.osdl.org>
In-Reply-To
<7v64ruo31i.fsf@assigned-by-dhcp.cox.net>
On Tue, 18 Oct 2005, Junio C Hamano wrote:
Show 5 quoted lines
> 
> 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
Previous: Junio C HamanoNext: H. Peter Anvin
Message 8 of 12 in “git-daemon extra paranoia”
  1. git-daemon extra paranoiaH. Peter Anvin, Oct 18, 2005
  2. Junio C HamanoOct 18, 2005
  3. H. Peter AnvinOct 18, 2005
  4. H. Peter AnvinOct 18, 2005
  5. Revised - git-daemon extra paranoiaH. Peter Anvin, Oct 18, 2005
  6. Linus TorvaldsOct 18, 2005
  7. Junio C HamanoOct 18, 2005
  8. Linus TorvaldsOct 18, 2005
  9. H. Peter AnvinOct 19, 2005
  10. Linus TorvaldsOct 19, 2005
  11. H. Peter AnvinOct 19, 2005
  12. Junio C HamanoOct 19, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.