diff options
author | Robie Basak <rb-oss-1@justgohome.co.uk> | 2008-12-29 16:03:04 +0000 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2008-12-29 19:11:46 +0100 |
commit | 6f4af4ae55f12e4d1cb5a1426d039edf5d04dee8 (patch) | |
tree | 9f6e89f7ce8d8b976a9178c5b9c8396a9df54913 /gbp | |
parent | 80921ebfda217cd9862f8a98d0c406b22404151b (diff) |
Use name and email from git
Closes: #509867
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/config.py | 3 | ||||
-rw-r--r-- | gbp/git_utils.py | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gbp/config.py b/gbp/config.py index cb524df..0f167e2 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -46,6 +46,7 @@ class GbpOptionParser(OptionParser): 'meta-closes' : 'Closes|LP', 'id-length' : '0', 'no-dch' : 'False', + 'git-author' : 'False', } help = { 'debian-branch': @@ -66,6 +67,8 @@ class GbpOptionParser(OptionParser): "use pristine-tar to create .orig.tar.gz, default is '%(pristine-tar)s'", 'filter': "files to filter out during import (can be given multiple times)", + 'git-author': + "use name and email from git-config for changelog trailer, default is '%(git-author)s'" } config_files = [ '/etc/git-buildpackage/gbp.conf', os.path.expanduser('~/.gbp.conf'), diff --git a/gbp/git_utils.py b/gbp/git_utils.py index da8884e..ce4ebed 100644 --- a/gbp/git_utils.py +++ b/gbp/git_utils.py @@ -153,6 +153,12 @@ class GitRepository(object): GitRm(verbose=verbose)(files) return not self.is_clean()[0] + def get_config(self, name): + """Gets the config value associated with name""" + self.__check_path() + value, ret = self.__git_getoutput('config', [ name ]) + if ret: raise KeyError + return value[0][:-1] # first line with \n ending removed def create_repo(path): """create a repository at path""" |