]> git.openstreetmap.org Git - chef.git/blobdiff - hooks/pre-commit
Use archive.ubuntu.com if we don't know the country
[chef.git] / hooks / pre-commit
index 55d23300cee8c20ff844da2a421821cd7bd7da7b..57c23a35a1026fa3c805278c392fd36b2e3aff62 100755 (executable)
@@ -3,7 +3,7 @@
 ok = true
 
 if IO.popen(["git", "ls-files", "--unmerged"]).read.empty?
-  need_stash = IO.popen(%w(git diff)).read.length > 0
+  need_stash = !IO.popen(%w(git diff)).read.empty?
 
   system("git", "stash", "save", "--keep-index", "--quiet") if need_stash