1.1 --- a/vcs-backup.sh Sat Apr 20 18:51:34 2019 +0200
1.2 +++ b/vcs-backup.sh Sat Apr 20 20:20:32 2019 +0200
1.3 @@ -139,8 +139,8 @@
1.4 url=$(cat "$VCS_BACKUP_CONFIG_DIR/$d/url.txt");
1.5
1.6 if isValidTypeAndURL "$vcsType" "$url"; then
1.7 - if [[ "$vcsType" == "hg" ]]; then hg clone -U "$url" "$VCS_BACKUP_CURRENT_DIR/$d";
1.8 - elif [[ "$vcsType" == "git" ]]; then git clone --bare "$url" "$VCS_BACKUP_CURRENT_DIR/$d";
1.9 + if [[ "$vcsType" == "hg" ]]; then hg clone -U "$url" "$VCS_BACKUP_CURRENT_DIR/$d";
1.10 + elif [[ "$vcsType" == "git" ]]; then git clone --mirror "$url" "$VCS_BACKUP_CURRENT_DIR/$d";
1.11 fi && echo "cloned" > "$VCS_BACKUP_CONFIG_DIR/$d/state.txt";
1.12 else
1.13 echo "Unsupported VCS type: '$vcsType' or URL: '$url'" >&2;