lib/braid/operations.rb in braid-1.0.10 vs lib/braid/operations.rb in braid-1.0.11
- old
+ new
@@ -145,18 +145,10 @@
status, out, err = exec(cmd)
raise ShellExecutionError.new(err, out) unless status == 0
[status, out, err]
end
- def sh(cmd, message = nil)
- message ||= 'could not fetch' if cmd =~ /fetch/
- log(cmd)
- `#{cmd}`
- raise ShellExecutionError, message unless $?.exitstatus == 0
- true
- end
-
def msg(str)
puts "Braid: #{str}"
end
def log(cmd)
@@ -191,11 +183,10 @@
end
end
def fetch(remote = nil, *args)
args.unshift "-n #{remote}" if remote
- # open4 messes with the pipes of index-pack
- sh("git fetch #{args.join(' ')} > #{Gem.win_platform? ? 'nul' : '/dev/null'}")
+ exec!("git fetch #{args.join(' ')} > #{Gem.win_platform? ? 'nul' : '/dev/null'}")
end
def checkout(treeish)
invoke(:checkout, treeish)
true