git.rev_parse: unconditionally use --quiet
authorGuido Günther <agx@sigxcpu.org>
Sun, 23 Jan 2011 14:48:50 +0000 (15:48 +0100)
committerGuido Günther <agx@sigxcpu.org>
Sun, 23 Jan 2011 14:50:09 +0000 (15:50 +0100)
to avoid the confusing "fatal: Needed a single revision" error message

gbp/deb.py
gbp/git.py

index 1a53563..ff361d6 100644 (file)
@@ -181,7 +181,7 @@ def parse_changelog_repo(repo, branch, filename):
         # to show as well, but we want to check if the branch / filename
         # exists first, so we can give a separate error from other
         # repository errors.
-        sha = repo.rev_parse("%s:%s" % (branch, filename), quiet=True)
+        sha = repo.rev_parse("%s:%s" % (branch, filename))
     except GitRepositoryError:
         raise NoChangelogError, "Changelog %s not found in branch %s" % (filename, branch)
 
index 04fef6a..4f2507f 100644 (file)
@@ -324,11 +324,9 @@ class GitRepository(object):
             raise GitRepositoryError, "can't find tag for %s" % commit
         return tag[0].strip()
 
-    def rev_parse(self, name, quiet=False):
+    def rev_parse(self, name):
         "find the SHA1"
-        args = [ "--verify", name]
-        if quiet:
-            args.insert(0, "--quiet")
+        args = [ "--quiet", "--verify", name ]
         sha, ret = self.__git_getoutput('rev-parse', args)
         if ret:
             raise GitRepositoryError, "revision '%s' not found" % name