Skip to content
Snippets Groups Projects
Commit d3ab2c37 authored by Iain Bryson's avatar Iain Bryson
Browse files

Fix bugs related to committing and pushing sets of changes and branching.

parent d0f73dda
Branches
Tags
No related merge requests found
......@@ -132,16 +132,17 @@ module DtuCore
if not_remote
Rails.logger.warn "git_remote is false, skipping push"
else
g.push remote: "origin", branch: self.git_branch
g.push(g.remote("origin"), g.branch(self.git_branch))
end
end
def change_and_push(adds, rms, commit_message)
begin
g = Git.open(self.git_repo_info.local_repo_folder, :log => Rails.logger)
self.push g
set_git_identity(g)
g.add(adds)
g.remove(rms)
g.add(adds) unless adds.empty?
g.remove(rms) unless rms.empty?
g.commit(commit_message)
self.push g
rescue => e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment