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

Re: contrib/git-normal-to-bare.sh

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
May 27, 2013, 09:02 UTC
Message-ID
<vpqr4gs23u6.fsf@anie.imag.fr>
In-Reply-To
<CAOsGNSSFx7VEOmz4qTt9nz=SXzQCZH7PdZ+gnYVqLhmRmRcT-A@mail.gmail.com>
Zenaan Harkness <zen@freedbms.net> writes:
>    rm -rf $repo

The user would appreciate if you check that there are no uncommited changes and no untracked files (at least no untracked and not ignored files) before running this.

Also, it's "$repo", not just $repo, or you'll get surprising behavior if $repo contain spaces.

The safe way would actually be stg like:
  rm -fr -- "$repo"
in case $repo starts with a dash.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Zenaan HarknessNext: Zenaan Harkness
Message 2 of 5 in “contrib/git-normal-to-bare.sh”
  1. Zenaan HarknessMay 27, 2013
  2. Matthieu MoyMay 27, 2013
  3. Zenaan HarknessMay 27, 2013
  4. Fredrik GustafssonMay 27, 2013
  5. Felipe ContrerasMay 29, 2013

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.