Trace checkout_cached_dir, use rev-parse in place of some hack

This commit is contained in:
Foo 2017-05-01 01:16:40 +03:00
parent 225ed1f230
commit 2fcbd89ef8

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
set -e set -e
set -x
remote_master_hex() { remote_master_hex() {
local url="$1" local url="$1"
@ -16,7 +17,7 @@ checkout_cached_dir() {
fi fi
if ! test -d "$target" ; then if ! test -d "$target" ; then
git clone --depth=1 "$url" "$target" git clone --depth=1 "$url" "$target"
mv "$target"/.git/refs/heads/master .version git rev-parse HEAD > .version
rm -rf "$target"/.git rm -rf "$target"/.git
fi fi
} }