summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-mirror3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-mirror b/git-mirror
index d09dfb6..76763c1 100755
--- a/git-mirror
+++ b/git-mirror
@@ -30,8 +30,7 @@ mirror-repo() {
repo=$1
canonical_path="$(config-get "repo.${repo}.canonical")"
local_path="$(config-get "repo.${repo}.local")"
- description="$(config-get "repo.${repo}.description")"
- [[ -n $description ]] || description="mirror of ${canonical_path}"
+ description="$(config-get "repo.${repo}.description" || printf 'mirror of %s' "${canonical_path}")"
gitget -f -n "$repo" bare "$canonical_path" "$local_path"
printf '%s\n' "$description" > "$local_path/description.tmp"