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

Re: Git: "No you can't handle my root!" (?)

From
Tony Finch <dot@dotat.at>
Date
Oct 13, 2009, 17:46 UTC
Message-ID
<alpine.LSU.2.00.0910131842440.11815@hermes-1.csi.cam.ac.uk>
In-Reply-To
<20091012183519.GA10686@coredump.intra.peff.net>
On Mon, 12 Oct 2009, Jeff King wrote:
Show 5 quoted lines
>
>   $ cd /
>   $ git init
>   $ cd /etc/whatever
>   $ git add .

One reason that you don't want to do this (even if it does work) is that careless use of git (e.g. by a user who is not the sysadmin playing with git in their home directory) is going to find the root repository when you expect it not to find any repository.

Also, I suggest this little wrapper script: http://dotat.at/cgi/git?p=git-deploy.git;a=blob;f=git-root.sh

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS.
MODERATE OR GOOD.
Previous: sylvain@demarque.qc.caNext: Markus Heidelberg
Message 9 of 18 in “Git: "No you can't handle my root!" (?)”
  1. sylvain@demarque.qc.caOct 12, 2009
  2. sylvain@demarque.qc.caOct 12, 2009
  3. Steven NoonanOct 12, 2009
  4. Alex RiesenOct 12, 2009
  5. sylvain@demarque.qc.caOct 12, 2009
  6. Alex RiesenOct 12, 2009
  7. Jeff KingOct 12, 2009
  8. sylvain@demarque.qc.caOct 12, 2009
  9. Tony FinchOct 13, 2009
  10. Markus HeidelbergOct 12, 2009
  11. Matthieu MoyOct 12, 2009
  12. Daniele SegatoOct 12, 2009
  13. Avery PennarunOct 12, 2009
  14. sylvain@demarque.qc.caOct 12, 2009
  15. Jeff KingOct 13, 2009
  16. Daniele SegatoOct 13, 2009
  17. Jeff KingOct 13, 2009
  18. Wesley J. LandakerOct 15, 2009

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.