From 52ecf232fb543ba69674e80f50243bf67aa50287 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 27 Jul 2015 11:36:39 -0400 Subject: [PATCH] only push when needsinit --- Assistant/WebApp/Configurators/Ssh.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Assistant/WebApp/Configurators/Ssh.hs b/Assistant/WebApp/Configurators/Ssh.hs index 7239e21f95..7d78704cc7 100644 --- a/Assistant/WebApp/Configurators/Ssh.hs +++ b/Assistant/WebApp/Configurators/Ssh.hs @@ -506,11 +506,12 @@ prepSsh' needsinit origsshdata sshdata keypair a {- To ensure the repository is initialized, try to push the - git-annex branch to it. Then git-annex-shell will see - the branch and auto-initialize. -} - void $ liftAnnex $ inRepo $ Git.Command.runBool - [ Param "push" - , Param (genSshUrl sshdata) - , Param (fromRef Annex.Branch.name) - ] + when needsinit $ do + void $ liftAnnex $ inRepo $ Git.Command.runBool + [ Param "push" + , Param (genSshUrl sshdata) + , Param (fromRef Annex.Branch.name) + ] a sshdata | otherwise = sshSetup (mkSshInput origsshdata) [ "-p", show (sshPort origsshdata)