diff --git a/Assistant/WebApp/Configurators/Ssh.hs b/Assistant/WebApp/Configurators/Ssh.hs index 5ebbb5308a..182347a209 100644 --- a/Assistant/WebApp/Configurators/Ssh.hs +++ b/Assistant/WebApp/Configurators/Ssh.hs @@ -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 diff --git a/debian/changelog b/debian/changelog index c0cba45ceb..8a50531671 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ git-annex (4.20130418) UNRELEASED; urgency=low don't have user.name set in git config, and put in a workaround so that commits to the git-annex branch (and the assistant) will still succeed despite git not liking the system configuration. + * 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. -- Joey Hess Thu, 18 Apr 2013 16:22:48 -0400 diff --git a/doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn b/doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn index 02513175c6..c2e05dee03 100644 --- a/doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn +++ b/doc/bugs/Adding_a_repository_as_a___34__remote_server__34___creates_a_bare_repository_next_to_the_existing_one.mdwn @@ -13,3 +13,9 @@ git-annex version: 4.20130324, Ubuntu 11.04 **Please provide any additional information below.** [[!tag /design/assistant]] + +> I have made it check for the .git directory and reuse the existing +> repository if it's there. [[done]] --[[Joey]] +> +> (The comment about `git-annex-shell` is incorrect; it has nothing +> to do with this.)