From dbe77fe58d391470cc4955ac1015aefbf8df2bcb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Jan 2009 23:04:07 -0500 Subject: [PATCH 1/1] checkout with reset --hard this is less prone to failure, and shows a progress bar --- lib/gitless | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 } -- 2.39.5