From e3af858ecc249f2932b8441b1389a1bc3daa5547 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Tue, 7 May 2019 11:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=AF=BC=E5=85=A5=E7=BA=BF?= =?UTF-8?q?=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/welcome_controller.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 44d4fb12..91cba4ab 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -150,13 +150,8 @@ class WelcomeController < ApplicationController shixun.update_column(:git_url, g.project(shixun.gpid).path_with_namespace) local_git_path = local_shixun.local_giturl.split('/').last if local_shixun.local_giturl.present? new_giturl = "http://educoder:xinhu1ji2qu3@"+g.project(shixun.gpid).http_url_to_repo.split('//').last - if system("cd tmp/repositories/#{local_git_path};") - system("git remote remove origin") - system("git remote add origin #{new_giturl}") - system("git add .") - system("git commit -m '..'") - system("git push origin master") - end + system("cd tmp/repositories/#{local_git_path};git remote remove origin;git remote add origin #{new_giturl}; + git add .;git commit -m '..';git push origin master") # http://Hjqreturn:xinhu1ji2qu3@bdgit.educoder.net/Hjqreturn/pgfqe6ch8.git (fetch)