diff options
Diffstat (limited to 'gitolite-sync.in')
-rw-r--r-- | gitolite-sync.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gitolite-sync.in b/gitolite-sync.in index 9c7bdf0..d22151c 100644 --- a/gitolite-sync.in +++ b/gitolite-sync.in @@ -50,7 +50,8 @@ for repository_dir in "${repository_dirs[@]}"; do | awk '{print $1}' \ | sort -u ) - if [ -z "${remotes}" ]; then + if [ -z "${remotes}" ] \ + && ! git -C "${path}" remote get-url "${default_remote_name}" >/dev/null 2>&1; then >&2 printf 'adding default remote "%s", because no remote was found so far\n' \ "${default_remote_name}" git -C "${path}" remote add "${default_remote_name}" "$( |