Top |
Functions
gint | (*GgitSubmoduleCallback) () |
GgitSubmodule * | ggit_submodule_ref () |
void | ggit_submodule_unref () |
GgitRepository * | ggit_submodule_get_owner () |
const gchar * | ggit_submodule_get_name () |
const gchar * | ggit_submodule_get_path () |
const gchar * | ggit_submodule_get_url () |
GgitOId * | ggit_submodule_get_index_id () |
GgitOId * | ggit_submodule_get_head_id () |
GgitOId * | ggit_submodule_get_workdir_id () |
GgitSubmoduleIgnore | ggit_submodule_get_ignore () |
GgitSubmoduleUpdate | ggit_submodule_get_update () |
gboolean | ggit_submodule_get_fetch_recurse () |
void | ggit_submodule_init () |
void | ggit_submodule_sync () |
void | ggit_submodule_reload () |
Types and Values
GgitSubmodule | |
enum | GgitSubmoduleIgnore |
enum | GgitSubmoduleStatus |
enum | GgitSubmoduleUpdate |
Functions
GgitSubmoduleCallback ()
gint (*GgitSubmoduleCallback) (GgitSubmodule *submodule
,const gchar *name
,gpointer user_data
);
The type of the callback functions for retrieving the submodules
in a GgitRepository. See ggit_repository_submodule_foreach()
.
ggit_submodule_ref ()
GgitSubmodule *
ggit_submodule_ref (GgitSubmodule *submodule
);
Atomically increments the reference count of submodule
by one.
This function is MT-safe and may be called from any thread.
ggit_submodule_unref ()
void
ggit_submodule_unref (GgitSubmodule *submodule
);
Atomically decrements the reference count of submodule
by one.
If the reference count drops to 0, remote
is freed.
ggit_submodule_get_owner ()
GgitRepository *
ggit_submodule_get_owner (GgitSubmodule *submodule
);
Gets the containing repository for a submodule.
ggit_submodule_get_name ()
const gchar *
ggit_submodule_get_name (GgitSubmodule *submodule
);
Gets the name of the submodule from .gitmodules.
ggit_submodule_get_path ()
const gchar *
ggit_submodule_get_path (GgitSubmodule *submodule
);
Gets the path to the submodule from the repo working directory.
It is almost always the same as the name.
See ggit_submodule_get_name()
.
ggit_submodule_get_url ()
const gchar *
ggit_submodule_get_url (GgitSubmodule *submodule
);
Gets the url for the submodule or NULL
if the submodule has been deleted
but not yet committed.
ggit_submodule_get_index_id ()
GgitOId *
ggit_submodule_get_index_id (GgitSubmodule *submodule
);
Gets the OID for the submodule in the index or NULL
if there is no index.
ggit_submodule_get_workdir_id ()
GgitOId *
ggit_submodule_get_workdir_id (GgitSubmodule *submodule
);
Gets the OID for the submodule in the current working directory.
Corresponds to looking up 'HEAD' in the checked out submodule.
If there are pending changes in the index or anything
else, this won't notice that. You should call ggit_submodule_status()
for a more complete picture about the state of the working directory.
ggit_submodule_get_ignore ()
GgitSubmoduleIgnore
ggit_submodule_get_ignore (GgitSubmodule *submodule
);
Gets a GgitSubmoduleIgnore. See see gitmodules(5) ignore.
ggit_submodule_get_update ()
GgitSubmoduleUpdate
ggit_submodule_get_update (GgitSubmodule *submodule
);
Gets a GgitSubmoduleUpdate. See see gitmodules(5) update.
ggit_submodule_get_fetch_recurse ()
gboolean
ggit_submodule_get_fetch_recurse (GgitSubmodule *submodule
);
Gets whether to fetch recursively. See see gitmodules(5) fetchRecurseSubmodules.
ggit_submodule_init ()
void ggit_submodule_init (GgitSubmodule *submodule
,gboolean overwrite
,GError **error
);
Just like "git submodule init", this copies information about the submodule into ".git/config". You can use the accessor functions above to alter the in-memory git_submodule object and control what is written to the config, overriding what is in .gitmodules.
ggit_submodule_sync ()
void ggit_submodule_sync (GgitSubmodule *submodule
,GError **error
);
Copies the information about the submodules URL into the checked out submodule config, acting like "git submodule sync". This is useful if you have altered the URL for the submodule (or it has been altered by a fetch of upstream changes) and you need to update your local repo.
ggit_submodule_reload ()
void ggit_submodule_reload (GgitSubmodule *submodule
,gboolean force
,GError **error
);
Rereads submodule info from config, index, and HEAD. Call this if you have reason to believe that it has changed.
Types and Values
enum GgitSubmoduleUpdate
Describes how a submodule should be updated.
Members
checkout the submodule. |
||
rebase the current branch onto the commit recorded in the superproject. |
||
merge the commit recorded in the superproject into the current branch. |
||
do not update this submodule. |
||
not used except as static initializer when we don't want any particular update rule to be specified. |