Ggit.Branch

g GObject.Object GObject.Object Ggit.ObjectFactoryBase Ggit.ObjectFactoryBase GObject.Object->Ggit.ObjectFactoryBase Ggit.Branch Ggit.Branch Ggit.Native Ggit.Native Ggit.Ref Ggit.Ref Ggit.Native->Ggit.Ref Ggit.ObjectFactoryBase->Ggit.Native Ggit.Ref->Ggit.Branch

Subclasses:

None

Methods

Inherited:

Ggit.Ref (21), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

delete ()

get_name ()

get_upstream ()

is_head ()

move (new_branch_name, flags)

set_upstream (upstream_branch_name)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Ggit.Native (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Ggit.Ref

r

Class Details

class Ggit.Branch(**kwargs)
Bases:

Ggit.Ref

Abstract:

No

Structure:

Ggit.BranchClass

Represents a branch object.

delete()
Raises:

GLib.Error

Deletes an existing branch reference.

If the branch is successfully deleted, this object is not useful anymore and if should be freed with GObject.Object.unref().

get_name()
Raises:

GLib.Error

Returns:

the name of the given local or remote branch or None.

Return type:

str or None

Gets the name of the given local or remote branch.

get_upstream()
Raises:

GLib.Error

Returns:

the reference supporting the remote tracking branch or None.

Return type:

Ggit.Ref or None

Gets the reference supporting the remote tracking branch, given a local branch reference.

is_head()
Raises:

GLib.Error

Returns:

True if the current local branch is pointed at by HEAD.

Return type:

bool

Determines if the current local branch is pointed at by HEAD.

move(new_branch_name, flags)
Parameters:
Raises:

GLib.Error

Returns:

the new branch or None.

Return type:

Ggit.Branch or None

Moves/renames an existing branch reference.

set_upstream(upstream_branch_name)
Parameters:

upstream_branch_name (str) – name of the upstream branch; if None unsets it.

Raises:

GLib.Error

Sets the upstream branch, for a given local branch reference