webapp: When told to add a git repository on a remote server, and the repository already exists as a non-bare repository, use it, rather than initializing a bare repository in the same directory.
This commit is contained in:
parent
478b14b3c9
commit
e92a207df5
3 changed files with 10 additions and 1 deletions
|
@ -290,7 +290,7 @@ makeSsh' rsync setup sshdata keypair =
|
|||
remoteCommand = shellWrap $ join "&&" $ catMaybes
|
||||
[ Just $ "mkdir -p " ++ shellEscape remotedir
|
||||
, Just $ "cd " ++ shellEscape remotedir
|
||||
, if rsync then Nothing else Just "git init --bare --shared"
|
||||
, if rsync then Nothing else Just "if [ ! -d .git ]; then git init --bare --shared; fi"
|
||||
, if rsync then Nothing else Just "git annex init"
|
||||
, if needsPubKey sshdata
|
||||
then addAuthorizedKeysCommand (rsyncOnly sshdata) remotedir . sshPubKey <$> keypair
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue