webapp: When setting up a bare shared repository, enable non-fast-forward pushes.

This commit is contained in:
Joey Hess 2013-10-26 13:06:43 -04:00
parent 0c0e0e5550
commit 0dfe604ddc
4 changed files with 20 additions and 1 deletions

View file

@ -390,7 +390,7 @@ prepSsh' newgcrypt origsshdata sshdata keypair a = sshSetup
remoteCommand = shellWrap $ intercalate "&&" $ catMaybes
[ Just $ "mkdir -p " ++ shellEscape remotedir
, Just $ "cd " ++ shellEscape remotedir
, if rsynconly then Nothing else Just "if [ ! -d .git ]; then git init --bare --shared; fi"
, if rsynconly then Nothing else Just "if [ ! -d .git ]; then git init --bare --shared && git config receive.denyNonFastforwards false; fi"
, if rsynconly || newgcrypt then Nothing else Just "git annex init"
, if needsPubKey origsshdata
then addAuthorizedKeysCommand (hasCapability origsshdata GitAnnexShellCapable) remotedir . sshPubKey <$> keypair