Skip to content

Commit

Permalink
Made commits keep track of the commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Ownbey committed Aug 8, 2008
1 parent efefae7 commit 97e15b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/models/code_comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def export! version_number
puts "Version 2:"
puts version.body
begin
export(pre_version, version)
commit = export(pre_version, version)
rescue
Error.create({
:pre_version => pre_version,
Expand All @@ -110,6 +110,7 @@ def export! version_number
self.without_versioning do
version.exported = true
self.raw_body = nil
self.commit = commit
version.save
end
end
Expand Down Expand Up @@ -177,10 +178,10 @@ def export v1, v2
git.config('user.name', v2.user.try(:login) || 'Docbox')
git.config('user.email', v2.user.try(:email) || '[email protected]')
commit = git.commit_all("Documentation update for #{owner.name}")
self.commit = commit.split(' ')[2][0..-2]
unless other_commits_pending?
git.push('origin', 'docs') if Setting[:auto_push]
end
commit.split[2][0..-2]
end

def other_commits_pending?
Expand Down

0 comments on commit 97e15b6

Please sign in to comment.