From: Nicolas Boisselier Date: Fri, 11 Oct 2024 14:03:31 +0000 (+0200) Subject: etc/profile.d/git.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=9d0dbadff8527d13fd34e2260093a2265e2b9c0f;p=nb.git etc/profile.d/git.sh --- diff --git a/etc/profile.d/git.sh b/etc/profile.d/git.sh index 983b1941..da3ab28c 100644 --- a/etc/profile.d/git.sh +++ b/etc/profile.d/git.sh @@ -170,7 +170,7 @@ git_create() { echo ">git init --bare ${dir}.git --initial-branch=main" local user=${repo%@*} - ssh root@${repo#*@} "cd ~git || exit; test -e ${dir}.git && echo "${dir}.git already exists on $repo" 1>&2 && exit 1; git init --bare ${dir}.git --initial-branch=main && chown -R $user.$user ${dir}.git" || return + ssh root@${repo#*@} "cd ~git || exit; test -e ${dir}.git && echo "${dir}.git already exists on $repo" 1>&2 && exit 1; git init --bare ${dir}.git --initial-branch=main && chown -R $user:$user ${dir}.git" || return echo ">git init --initial-branch=main" git init --initial-branch=main || return