Commit 944d3823 authored by David Barri's avatar David Barri

Fix for git commit when nothing to commit.

Turns out git commit returns with 128 when user.name config not present.
parent 6f25967c
......@@ -192,7 +192,9 @@ module Gitlab
def push tmp_dir
Dir.chdir(File.join(tmp_dir, "gitolite"))
raise "Git add failed." unless system('git add -A')
raise "Git commit failed." unless system('git commit -am "GitLab"')
system('git commit -m "GitLab"') # git commit returns 0 on success, and 1 if there is nothing to commit
raise "Git commit failed." unless [0,1].include? $?.exitstatus
if system('git push')
Dir.chdir(Rails.root)
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment