diff options
Diffstat (limited to 'gbp/git')
-rw-r--r-- | gbp/git/repository.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 689430f..848fd57 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -925,6 +925,19 @@ class GitRepository(object): """ self._git_command("checkout", ["--quiet", treeish]) + def checkout_files(self, treeish, paths): + """ + Checkout files from a treeish. Branch will not be changed. + + @param treeish: the treeish from which to check out files + @type treeish: C{str} + @param paths: list of files to checkout + @type treeish: C{list} of C{str} + """ + args = GitArgs("--quiet", treeish) + args.add_true(paths, '--', paths) + self._git_command("checkout", args.args) + def has_treeish(self, treeish): """ Check if the repository has the treeish object I{treeish}. |