Ggit.CloneOptions

g GObject.Object GObject.Object Ggit.CloneOptions Ggit.CloneOptions GObject.Object->Ggit.CloneOptions

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_checkout_branch ()

get_fetch_options ()

get_is_bare ()

get_local ()

set_checkout_branch (checkout_branch)

set_fetch_options (fetch_options)

set_is_bare (bare)

set_local (local)

Virtual Methods

Inherited:

GObject.Object (7)

do_create_remote (repository, name, url)

do_create_repository (path, is_bare)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Ggit.CloneOptions(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Ggit.CloneOptionsClass

Represents the options used when cloning.

classmethod new()
Returns:

a newly allocated Ggit.CloneOptions.

Return type:

Ggit.CloneOptions

Creates a new Ggit.CloneOptions.

get_checkout_branch()
Returns:

the name of the branch to checkout or None.

Return type:

str

Gets the name of the branch to checkout or None.

get_fetch_options()
Returns:

the fetch options or None.

Return type:

Ggit.FetchOptions

Get the fetch options object or None if not set.

get_is_bare()
Returns:

True to clone a bare repository.

Return type:

bool

Gets if the repository will be bare.

get_local()
Returns:

the local clone setting.

Return type:

Ggit.CloneLocal

Get setting for bypassing the git-aware transport when cloning. The default auto setting bypasses the git-aware transport for local paths, but use a normal fetch for file:// URIs.

set_checkout_branch(checkout_branch)
Parameters:

checkout_branch (str or None) – the name of the branch to checkout or None.

Gives the name of the branch to checkout. None means use the remote’s HEAD.

set_fetch_options(fetch_options)
Parameters:

fetch_options (Ggit.FetchOptions or None) – a Ggit.FetchOptions or None.

Set the fetch options object.

set_is_bare(bare)
Parameters:

bare (bool) – True to clone a bare repository.

Sets whether to clone a bare repository.

set_local(local)
Parameters:

local (Ggit.CloneLocal) – the local clone setting.

Set setting for bypassing the git-aware transport when cloning. The default auto setting bypasses the git-aware transport for local paths, but use a normal fetch for file:// URIs.

do_create_remote(repository, name, url) virtual
Parameters:
  • repository (Ggit.Repository) – the repository.

  • name (str) – the remote name.

  • url (str) – the remote url.

Returns:

a Ggit.Remote or None in case of an error.

Return type:

Ggit.Remote or None

do_create_repository(path, is_bare) virtual
Parameters:
  • path (str) – the repository path.

  • is_bare (bool) – whether a bare repository should be created.

Returns:

a Ggit.Repository or None in case of an error.

Return type:

Ggit.Repository or None