From: Karl Hasselström Date: Sun, 7 Oct 2007 13:48:33 +0000 (+0200) Subject: Discard stderr output from git-rev-parse X-Git-Tag: v0.14~54 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/d9d460a1eef90a883584d07b840f89ccdd332d45 Discard stderr output from git-rev-parse 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 --- 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