From: Maximiliano Curia <maxy@gnuservers.com.ar>
Date: Sat, 2 Sep 2017 14:08:42 +0200
Subject: Avoid the git error messages when running stg outside of a git tree

---
 stgit/version.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stgit/version.py b/stgit/version.py
index e00c260..a11f0d5 100644
--- a/stgit/version.py
+++ b/stgit/version.py
@@ -17,7 +17,7 @@ def git_describe_version():
     try:
         v = Run(
             'git', 'describe', '--tags', '--abbrev=4'
-        ).cwd(root).output_one_line()
+        ).cwd(root).discard_stderr().output_one_line()
     except RunException as e:
         raise VersionUnavailable(str(e))
     m = re.match(r'^v([0-9].*)', v)
@@ -28,7 +28,7 @@ def git_describe_version():
     try:
         dirty = Run(
             'git', 'diff-index', '--name-only', 'HEAD'
-        ).cwd(root).raw_output()
+        ).cwd(root).discard_stderr().raw_output()
     except RunException as e:
         raise VersionUnavailable(str(e))
     if dirty:
