From 8516466c1995f87e20542ae8ed5ef82649477165 Mon Sep 17 00:00:00 2001 From: Alex Dergachev Date: Mon, 1 Jun 2015 20:46:20 +0000 Subject: [PATCH] Fix error message and clarify git version req; fixes #15 --- README.md | 2 +- app/models/repository/git_remote.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 480f375..c4c5d97 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Then enable the new GitRemote SCM type in [http://redmine-root/settings?tab=repo ![](https://dl.dropbox.com/u/29440342/screenshots/AYKNZDTB-2014.11.27-15-59-06.png) The plugin shells out to the following binaries, so make sure they're available: -* git +* git 1.7.5+ - a version recent enough to support `get remote add --mirror=fetch origin URL` * ssh-keyscan * ssh-keygen diff --git a/app/models/repository/git_remote.rb b/app/models/repository/git_remote.rb index b9be9d9..f5c0b2d 100644 --- a/app/models/repository/git_remote.rb +++ b/app/models/repository/git_remote.rb @@ -110,7 +110,7 @@ class Repository::GitRemote < Repository::Git end unless system "git", "--git-dir", clone_path, "remote", "add", "--mirror=fetch", "origin", clone_url - return "Unable to run: git --git-dir #{clone_path} remote add #{clone_url}" + return "Unable to run: git --git-dir #{clone_path} remote add --mirror=fetch origin #{clone_url}" end end end