lib/stove/git.rb in stove-1.0.1 vs lib/stove/git.rb in stove-1.1.0

- old
+ new

@@ -42,9 +42,17 @@ !!git('status -s').strip.empty? rescue false end + def git_remote_uptodate?(options = {}) + git('fetch') + local = git("rev-parse #{options[:branch]}").strip + remote = git("rev-parse #{options[:remote]}/#{options[:branch]}").strip + + local == remote + end + def shellout(command) out, err = Tempfile.new('shellout.stdout'), Tempfile.new('shellout.stderr') begin pid = Process.spawn(command, out: out.to_i, err: err.to_i)