lib/commit.rb in dev_tasks-0.0.166 vs lib/commit.rb in dev_tasks-0.0.167
- old
+ new
@@ -2,10 +2,12 @@
require_relative('./environment.rb')
class Commit < CommandArray
def update
if(Dir.exists?(".git"))
- if(!`git status`.include?('nothing to commit') || `git status`.include?('untracked files present'))
+ if(`git status`.include?('nothing to commit') || `git status`.include?('untracked files present'))
+ # skip
+ else
if(File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/, "").length > 0)
self.add "git commit -a -v -m \"#{File.read('commit.message')}\""
self.add "<%File.open('commit.message','w'){|f|f.write('')}%>"
else
self.add 'git commit -a -v -m "commit all"'
\ No newline at end of file