X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/be8197cd3ebbd893e7d791f20ff7685d2815b55f..dbe77fe58d391470cc4955ac1015aefbf8df2bcb:/lib/gitless?ds=inline 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 }