diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-02-05 16:11:42 +0200 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2014-02-07 14:25:26 +0200 |
commit | 0065f61625348456970bff317ed2b127b7f49e93 (patch) | |
tree | 87066c54b4806d4337de29586e3aa15fabe8eeb5 | |
parent | e4d82c65e9d95e50e6e7050d08c243ed2ac30a0f (diff) | |
download | git-buildpackage-0065f61625348456970bff317ed2b127b7f49e93.tar.gz git-buildpackage-0065f61625348456970bff317ed2b127b7f49e93.tar.bz2 git-buildpackage-0065f61625348456970bff317ed2b127b7f49e93.zip |
GitRepository.commit_files: add edit argument
In order to be able to spawn an editor, similarly to other commitX
methods in GitRepository.
Change-Id: Ie110cd36dde90b5d1ead5da219f0be00d49830dd
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r-- | gbp/git/repository.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 40906b11..a71299b4 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1468,7 +1468,8 @@ class GitRepository(object): """ self._commit(msg=msg, args=['-a'], author_info=author_info, edit=edit) - def commit_files(self, files, msg, author_info=None, committer_info=None): + def commit_files(self, files, msg, author_info=None, committer_info=None, + edit=False): """ Commit the given files to the repository @@ -1480,11 +1481,13 @@ class GitRepository(object): @type author_info: L{GitModifier} @param committer_info: committer information @type committer_info: L{GitModifier} + @param edit: whether to spawn an editor to edit the commit info + @type edit: C{bool} """ - if isinstance(files, basestring): - files = [ files ] - self._commit(msg=msg, args=files, author_info=author_info, - committer_info=committer_info) + args = GitArgs('--') + args.add(files) + self._commit(msg=msg, args=args.args, author_info=author_info, + committer_info=committer_info, edit=edit) def commit_dir(self, unpack_dir, msg, branch, other_parents=None, author={}, committer={}, create_missing_branch=False): |