lib/dpl/ctx/bash.rb in dpl-2.0.0.alpha.10 vs lib/dpl/ctx/bash.rb in dpl-2.0.0.alpha.11
- old
+ new
@@ -408,12 +408,12 @@
# Returns the comitter email of the commit `git_sha`.
def git_author_email
`git log #{git_sha} -n 1 --pretty=%ae`.chomp
end
- # Whether or not the git working directory is dirty
+ # Whether or not the git working directory is dirty or has new or deleted files
def git_dirty?
- !Kernel.system('git diff --quiet')
+ !`git status --short`.chomp.empty?
end
# Returns the output of `git log`, using the given args.
def git_log(args)
`git log #{args}`.chomp