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

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:57:27

Zenaan Harkness [off-list ref] 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/

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

From: Zenaan Harkness <hidden>
Date: 2016-06-15 22:57:27

On 5/27/13, Matthieu Moy [off-list ref] wrote:
Zenaan Harkness [off-list ref] writes:
quoted
   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"
Thanks.

In my later email, I changed it to mv - should have highlighted there
was a change. I got bitten, on a small repo thankfully, where a perms
or ownership problem caused the whole repo to disappear. So mv it is
:)

BTW, I've subscribed for a little while now...

Thanks again
Zenaan

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

From: Fredrik Gustafsson <hidden>
Date: 2016-06-15 22:57:27

On Mon, May 27, 2013 at 07:43:13PM +1000, Zenaan Harkness wrote:
In my later email, I changed it to mv - should have highlighted there
was a change. I got bitten, on a small repo thankfully, where a perms
or ownership problem caused the whole repo to disappear. So mv it is
:)
Do you really need bash for that script or will it do with sh? I think
sh is preferred.

Also a mv instead of a rm will require a lot of disc space if you have a
big repository.

-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help