[StGit PATCH 7/8] Discard stderr output from git-rev-parse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This gets rid of the annoying "fatal: Needed a single revision"
messages that were printed in addition to StGit's own error message.

Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx>

---

 stgit/git.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/stgit/git.py b/stgit/git.py
index 0026fd8..812b77a 100644
--- a/stgit/git.py
+++ b/stgit/git.py
@@ -301,7 +301,8 @@ def rev_parse(git_id):
     """Parse the string and return a verified SHA1 id
     """
     try:
-        return GRun('git-rev-parse', '--verify', git_id).output_one_line()
+        return GRun('git-rev-parse', '--verify', git_id
+                    ).discard_stderr().output_one_line()
     except GitRunException:
         raise GitException, 'Unknown revision: %s' % git_id
 

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux