From a17c43d0662bab137903075f2cff34bcabc7e1d1 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 24 Nov 2010 12:30:51 +0100 Subject: Made previously protected methods public to introduce a method with reflog support which cannot be exposed using the respective property. Ref-Creation is now fully implemented in python. For details, see doc/source/changes.rst --- refs/head.py | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'refs/head.py') diff --git a/refs/head.py b/refs/head.py index 08ad581d..d8729434 100644 --- a/refs/head.py +++ b/refs/head.py @@ -112,38 +112,6 @@ class Head(Reference): k_config_remote = "remote" k_config_remote_ref = "merge" # branch to merge from remote - @classmethod - def create(cls, repo, path, commit='HEAD', force=False, **kwargs): - """Create a new head. - :param repo: Repository to create the head in - :param path: - The name or path of the head, i.e. 'new_branch' or - feature/feature1. The prefix refs/heads is implied. - - :param commit: - Commit to which the new head should point, defaults to the - current HEAD - - :param force: - if True, force creation even if branch with that name already exists. - - :param kwargs: - Additional keyword arguments to be passed to git-branch, i.e. - track, no-track, l - - :return: Newly created Head - :note: This does not alter the current HEAD, index or Working Tree""" - if cls is not Head: - raise TypeError("Only Heads can be created explicitly, not objects of type %s" % cls.__name__) - - args = ( path, commit ) - if force: - kwargs['f'] = True - - repo.git.branch(*args, **kwargs) - return cls(repo, "%s/%s" % ( cls._common_path_default, path)) - - @classmethod def delete(cls, repo, *heads, **kwargs): """Delete the given heads @@ -157,7 +125,6 @@ class Head(Reference): flag = "-D" repo.git.branch(flag, *heads) - def set_tracking_branch(self, remote_reference): """ Configure this branch to track the given remote reference. This will alter -- cgit v1.2.3