diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 12:30:51 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 12:30:51 +0100 |
commit | a17c43d0662bab137903075f2cff34bcabc7e1d1 (patch) | |
tree | f757e77c85213da7c53d129476430745465935b0 /refs/head.py | |
parent | 8dd51f1d63fa5ee704c2bdf4cb607bb6a71817d2 (diff) | |
download | gitpython-a17c43d0662bab137903075f2cff34bcabc7e1d1.tar.gz |
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
Diffstat (limited to 'refs/head.py')
-rw-r--r-- | refs/head.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/refs/head.py b/refs/head.py index 08ad581d..d8729434 100644 --- a/refs/head.py +++ b/refs/head.py @@ -113,38 +113,6 @@ class Head(Reference): 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 :param force: @@ -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 |