| Top | Description | Object Hierarchy |
GgitRemote; GgitRemoteHead; enum GgitRemoteDownloadTagsType; gint (*GgitRemoteListCallback) (const gchar *name,GgitOId *oid,GgitOId *loid,gboolean local,gpointer user_data); GgitRemote * ggit_remote_new (GgitRepository *repository,const gchar *url,const gchar *fetch_spec,GError **error); GgitRemote * ggit_remote_ref (GgitRemote *remote); void ggit_remote_unref (GgitRemote *remote); void ggit_remote_save (GgitRemote *remote,GError **error); const gchar * ggit_remote_get_name (GgitRemote *remote); const gchar * ggit_remote_get_url (GgitRemote *remote); void ggit_remote_connect (GgitRemote *remote,gboolean direction,GError **error); gboolean ggit_remote_get_connected (GgitRemote *remote); void ggit_remote_disconnect (GgitRemote *remote); void ggit_remote_add_fetch_spec (GgitRemote *remote,const gchar *fetch_spec,GError **error); void ggit_remote_add_push_spec (GgitRemote *remote,const gchar *push_spec,GError **error); GgitRemoteHead ** ggit_remote_list (GgitRemote *remote,GError **error); gboolean ggit_remote_is_valid_url (const gchar *url); gboolean ggit_remote_is_supported_url (const gchar *url); GgitOId * ggit_remote_head_get_local_oid (GgitRemoteHead *remote_head); const gchar * ggit_remote_head_get_name (GgitRemoteHead *remote_head); GgitOId * ggit_remote_head_get_oid (GgitRemoteHead *remote_head); GType ggit_remote_head_get_type (void); gboolean ggit_remote_head_is_local (GgitRemoteHead *remote_head); GgitRemoteHead * ggit_remote_head_ref (GgitRemoteHead *remote_head); void ggit_remote_head_unref (GgitRemoteHead *remote_head);
GBoxed +----GgitRemote
GBoxed +----GgitRemoteHead
GEnum +----GgitRemoteDownloadTagsType
typedef enum {
GGIT_REMOTE_DOWNLOAD_TAGS_AUTO = 0,
GGIT_REMOTE_DOWNLOAD_TAGS_NONE = 1,
GGIT_REMOTE_DOWNLOAD_TAGS_ALL = 2
} GgitRemoteDownloadTagsType;
gint (*GgitRemoteListCallback) (const gchar *name,GgitOId *oid,GgitOId *loid,gboolean local,gpointer user_data);
The type of the callback functions for listing the references of a
GgitRemote. See ggit_remote_list().
|
the name of the reference. |
|
the reference's oid. |
|
the reference's loid. |
|
if available locally. |
|
user-supplied data. [closure] |
Returns : |
0 to go continue or a GgitError in case there was an error. |
GgitRemote * ggit_remote_new (GgitRepository *repository,const gchar *url,const gchar *fetch_spec,GError **error);
Creates a remote with the default refspecs in memory. You can use this when you have a URL instead of a remote's name.
|
a GgitRepository. |
|
the remote repository's URL. |
|
the fetch refspec to use for this remote. |
|
a GError for error reporting, or NULL. |
Returns : |
a newly allocated GgitRemote. [transfer full] |
GgitRemote * ggit_remote_ref (GgitRemote *remote);
Atomically increments the reference count of remote by one.
This function is MT-safe and may be called from any thread.
|
a GgitRemote. |
Returns : |
the passed in GgitRemote. [transfer none] |
void ggit_remote_unref (GgitRemote *remote);
Atomically decrements the reference count of remote by one.
If the reference count drops to 0, remote is freed.
|
a GgitRemote. |
void ggit_remote_save (GgitRemote *remote,GError **error);
Saves a remote to its repository's configuration.
|
a GgitRemote. |
|
a GError or NULL. |
const gchar * ggit_remote_get_name (GgitRemote *remote);
Gets the remote's name.
|
a GgitRemote. |
Returns : |
the name of remote. |
const gchar * ggit_remote_get_url (GgitRemote *remote);
Gets the remote's url.
|
GgitRemote. |
Returns : |
the url of remote. |
void ggit_remote_connect (GgitRemote *remote,gboolean direction,GError **error);
Opens a connection to a remote. The transport is selected based on the URL. The direction argument is due to a limitation of the git protocol (over TCP or SSH) which starts up a specific binary which can only do the one or the other.
|
a GgitRemote. |
|
whether you want to receive or send data. |
|
a GError for error reporting, or NULL. |
gboolean ggit_remote_get_connected (GgitRemote *remote);
Check whether remote is connected.
|
a GgitRemote. |
Returns : |
TRUE if it is connected. |
void ggit_remote_disconnect (GgitRemote *remote);
Closes the connection to the remote and frees the underlying transport.
|
a GgitRemote. |
void ggit_remote_add_fetch_spec (GgitRemote *remote,const gchar *fetch_spec,GError **error);
Sets remote's fetch spec to fetch_spec.
|
a GgitRemote. |
|
the fetch refspec. |
|
a GError for error reporting, or NULL. |
void ggit_remote_add_push_spec (GgitRemote *remote,const gchar *push_spec,GError **error);
Sets remote's push spec to fetch_spec.
|
a GgitRemote. |
|
the push refspec. |
|
a GError for error reporting, or NULL. |
GgitRemoteHead ** ggit_remote_list (GgitRemote *remote,GError **error);
Get a list of refs at the remote.
|
a GgitRemote. |
|
a GError for error reporting, or NULL. |
Returns : |
the remote heads. [array zero-terminated=1] |
gboolean ggit_remote_is_valid_url (const gchar *url);
Checks if url is a valid remote URL.
|
a url string. |
Returns : |
whether a string is a valid remote URL. |
gboolean ggit_remote_is_supported_url (const gchar *url);
Checks if url is a supported remote URL.
|
a url string. |
Returns : |
whether a string is a supported remote URL. |
GgitOId * ggit_remote_head_get_local_oid (GgitRemoteHead *remote_head);
Get the local oid of the remote head.
|
a GgitRemoteHead. |
Returns : |
the local oid. [transfer none] |
const gchar * ggit_remote_head_get_name (GgitRemoteHead *remote_head);
Get the remote head name.
|
a GgitRemoteHead. |
Returns : |
the remote head name. |
GgitOId * ggit_remote_head_get_oid (GgitRemoteHead *remote_head);
Get the remote oid of the remote head.
|
a GgitRemoteHead. |
Returns : |
the remote oid. [transfer none] |
gboolean ggit_remote_head_is_local (GgitRemoteHead *remote_head);
Get whether the remote head is local.
|
a GgitRemoteHead. |
Returns : |
whether the remote head is local. |