From: Joey Hess Date: Fri, 16 Jan 2009 04:04:07 +0000 (-0500) Subject: checkout with reset --hard X-Git-Url: https://git.madduck.net/code/myrepos.git/commitdiff_plain/dbe77fe58d391470cc4955ac1015aefbf8df2bcb?ds=sidebyside;hp=be8197cd3ebbd893e7d791f20ff7685d2815b55f checkout with reset --hard this is less prone to failure, and shows a progress bar --- diff --git a/lib/gitless b/lib/gitless index 8781316..334326e 100644 --- a/lib/gitless +++ b/lib/gitless @@ -21,7 +21,6 @@ # commands can be used, as long as the file server is available. lib = - gitless_checkout() { server="$1" remotebase="$2" @@ -33,9 +32,9 @@ lib = if [ ! -d "$remotebase/$dir.$hostname" ]; then git clone --no-checkout "$remotebase/$dir.git" "$remotebase/$dir.$hostname" fi - mkdir -p $dir - cd $dir - ln -sf $remotebase/$dir/.git - git checkout . + mkdir -p "$dir" + cd "$dir" + ln -sf "$remotebase/$dir.$hostname/.git" + git reset --hard fi }