Class: Braid::Commands::Diff
- Inherits:
-
Braid::Command
- Object
- Braid::Command
- Braid::Commands::Diff
- Defined in:
- lib/braid/commands/diff.rb
Instance Method Summary collapse
Methods inherited from Braid::Command
#config, msg, #msg, run, #verbose?
Methods included from Operations::VersionControl
#git, #git_cache, #git_svn, #gitclone, #svn
Instance Method Details
#run(path) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/braid/commands/diff.rb', line 4 def run(path) mirror = config.get!(path) if mirror.type == "git-clone" unless system("cd #{mirror.path} && git diff") msg "Error diffing \"#{path}\" in \"#{mirror.path}\"" exit 1 end else setup_remote(mirror) diff = mirror.diff puts diff unless diff.empty? end end |