Skip to content

Commit 39d7123

Browse files
author
root
committed
Better handling of errors on git commit
1 parent c9bc0b3 commit 39d7123

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: lib/redmine_gitolite/admin.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@ def gitolite_admin_repo_commit(message = '')
112112
begin
113113
@gitolite_admin.save("'#{@action} : #{message}'", :author => @gitolite_author)
114114
rescue => e
115-
if !e.out.include?('nothing to commit')
115+
if e.out.include?('nothing to commit') || e.out.include?('nothing added')
116+
logger.warn { "#{@action} : nothing commited in Gitolite" }
117+
else
116118
logger.error { "#{e.message}" }
119+
logger.error { "#{e.out}" }
117120
end
118121
end
119122
end

0 commit comments

Comments
 (0)