Sha256: 039ed14d07ad8b9cdf39f311693b568504909c789e5a9c7149fdb87afa9b51bb
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
class Add < Array def update if(File.exists?('.git') && File.exists?('.gitignore')) add 'git add --all' else if(defined?(SOURCE)) if(File.exists?('.svn')) SOURCE.each{|f| if(File.exists?(f) && File.file?(f)) status=Command.output("svn status #{f}") error=Command.error("svn status #{f}") if(status.include?('?') || status.include?('was not found') || error.include?('was not found')) puts "svn add #{f} --parents" add "svn add #{f} --parents" else #puts "#{status}" if status.strip.length > 0 #puts " #{f}" if status.strip.length == 0 end end } end if(File.exists?('.git')) SOURCE.each{|f| status=`git status #{f} --short` #if status.include?('untracked') || status.include?('modified:') if status.include?('??') || status.include?(' M ') puts "git add #{f} -v" add "git add #{f} -v" else #puts status if status.strip.length > 0 end } end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dev-2.0.135 | lib/commands/add.rb |
dev-2.0.134 | lib/commands/add.rb |
dev-2.0.133 | lib/commands/add.rb |
dev-2.0.132 | lib/commands/add.rb |