22. Repository
Get the path of the shared common directory for this repository.
parameters |
Returns |
luagit2_repository |
common_dir_path (string) |
luagit2_repository
: The repository whose path is to be found.
- Returns common dir path of given repository.
Get the repository’s config.
parameters |
Returns |
luagit2_repository |
luagit2_config |
luagit2_repository
: The repository whose config is to be found.
- Returns corresponding
luagit2_config
or gives an error.
Get the repository’s config snapshot.
parameters |
Returns |
luagit2_repository |
luagit2_config |
luagit2_repository
: The repository whose config is to be found.
- Returns corresponding snapshot type of
luagit2_config
or gives an error.
Detach the repository’s HEAD so that HEAD now points to nothing.
parameters |
Returns |
luagit2_repository |
None |
luagit2_repository
: The repository whose HEAD is to be detached.
- Returns None or gives an error.
Get the namespace value for a given repository.
parameters |
Returns |
luagit2_repository |
namespace (string) |
luagit2_repository
: The repository whose namespace is to be found.
- Returns corresponding namespace or gives an error.
Get the Reference being pointed by the repository’s HEAD.
parameters |
Returns |
luagit2_repository |
luagit2_reference |
luagit2_repository
: The repository whose reference being pointed by HEAD is to be found.
- Returns corresponding
luagit2_reference
or gives an error.
Check if repository’s HEAD is detached or not.
parameters |
Returns |
luagit2_repository |
is_detached (boolean) |
luagit2_repository
: The repository which is to be checked.
- Returns Boolean equivalent for if the HEAD is detached or not.
Get The HEAD for the worktree.
parameters |
Returns |
luagit2_repository |
luagit2_reference |
worktree_name (string) |
luagit2_repository
: The repository where to look for worktree.
worktree_name
: The name of worktree to look for.
- Returns corresponding
luagit2_reference
or gives an error.
Check if HEAD for the repository is unborn, it is not at all created.
parameters |
Returns |
luagit2_repository |
is_unborn (boolean) |
luagit2_repository
: The repository which is to be checked.
- Returns Boolean equivalent for if the HEAD is unborn or not.
Get the repository’s identity details.
parameters |
Returns |
luagit2_repository |
name (string) |
|
email (string) |
luagit2_repository
: The repository whose identity details are to be found.
- Returns two values as name and email for set repo’s variables.
Get the repository’s currently active Index.
parameters |
Returns |
luagit2_repository |
luagit2_index |
luagit2_repository
: The repository whose index is to be found.
- Returns corresponding
luagit2_index
or gives an error .
Initialize an empty repository.
parameters |
Returns |
path_to_repo (string) |
luagit2_repository |
is_bare (integer) |
path_to_repo
: The path where new repository is to be initialized.
is_bare
: integer equlavalent of boolean for if the new repository should be bare or not.
- Returns a new
luagit2_repository
or gives an error.
Check if a repository is bare.
parameters |
Returns |
luagit2_repository |
is_bare (boolean) |
luagit2_repository
: The repository which is to be checked.
- Returns Boolean equivalent for repository it is bare or not.
Check if a repository is empty.
parameters |
Returns |
luagit2_repository |
is_empty (boolean) |
luagit2_repository
: The repository which is to be checked.
- Returns Boolean equivalent for if repository is empty or not.
Check if a repository is shallow.
parameters |
Returns |
luagit2_repository |
is_shallow (boolean) |
luagit2_repository
: The repository which is to be checked.
- Returns Boolean equivalent for if repository is shallow or not.
Check if the repository is also worktree. The answer may be different for a submodule repository.
parameters |
Returns |
luagit2_repository |
is_worktree (boolean) |
luagit2_repository
: The repository which is to be checked.
- Returns Boolean equivalent for if repository is worktree or not.
Get the repository’s message.
parameters |
Returns |
luagit2_repository |
luagit2_buf |
luagit2_repository
: The repository whose message is to be found.
- Returns message in a
luagit2_buf
or gives an error.
Remove message for the repository.
parameters |
Returns |
luagit2_repository |
None |
luagit2_repository
: The repository whose message is to be removed.
- Returns none or gives an error.
Get a repo’s odb (object database).
parameters |
Returns |
luagit2_repository |
luagit2_odb |
luagit2_repository
: The repository whose odb is to be removed.
- Returns corresponding
luagit2_odb
or gives an error.
Open a repository at a given path.
parameters |
Returns |
path_to_repo (string) |
luagit2_repository |
path_to_repo
: The path to repository to be opened.
- Returns corresponding
luagit2_repository
or gives an error.
Open a repository as bare repository at a given path.
parameters |
Returns |
path_to_repo (string) |
luagit2_repository |
path_to_repo
: The path to repository to be opened.
- Returns corresponding
luagit2_repository
or gives an error.
parameters |
Returns |
luagit2_worktree |
luagit2_repository |
luagit2_worktree
: The worktree using which repository is to be opened.
- Returns corresponding
luagit2_repository
or gives an error.
Get the repository’s path.
parameters |
Returns |
luagit2_repository |
path (string) |
luagit2_repository
: The repository whose path is to be found.
- Returns corresponding repository’s path or gives an error.
Get the repository’s reference database.
parameters |
Returns |
luagit2_repository |
luagit2_refdb |
luagit2_repository
: The repository whose reference database is to be found .
- Returns corresponding repository’s
luagit2_refdb
or gives an error.
set the HEAD of the repository to point to a given ref name.
parameters |
Returns |
luagit2_repository |
None |
ref_name (string) |
luagit2_repository
: The repository whose HEAD is to be set.
ref_name
: The reference name where the repository should point at.
- Returns None or gives an error.
Set the detached HEAD to point to a commit. It will not make HEAD point to a reference.
HEAD simply points to a given commit id.
parameters |
Returns |
luagit2_repository |
None |
luagit2_oid |
luagit2_repository
: The repository whose HEAD is to be set in a detached manner.
luagit2_oid
: Object id of the Commit the HEAD should point to.
- Returns None or gives error.
parameters |
Returns |
luagit2_repository |
None |
name (string) |
email(string) |
luagit2_repository
: The repository whose identity variables are to be set.
name
: The name to be set.
email
: The email variable to be set.
- Returns none or gives an error.
Set the namespace of the repository .
parameters |
Returns |
luagit2_repository |
None |
namespace(string) |
luagit2_repository
: The repository whose namespace is to be set.
namespace
: The namespace to be used.
- Returns None or gives an error.
Set the work directory of the repository .
parameters |
Returns |
luagit2_repository |
None |
workdir(string) |
luagit2_repository
: The repository whose workdir is to be set.
workdir
: The path of work directory to be used.
- Returns None or gives an error.
Get the integer value of a repository’s state values.
parameters |
Returns |
luagit2_repository |
state(integer) |
luagit2_repository
: the repository whose state values are to be found.
- Returns an integer value for state values flag set.
Cleanup the state values for a repository.
parameters |
Returns |
luagit2_repository |
None |
luagit2_repository
: The repository whose state values are to be cleaned.
- Returns none or gives error.
Get the repository’s work directory.
parameters |
Returns |
luagit2_repository |
work_dir (string) |
luagit2_repository
: The repository whose workdir is to be found.
- Returns the workdir path for the repository or gives an error.
Frees a used luagit2_repository object.
parameters |
Returns |
luagit2_repository |
None |
luagit2_repository
: The repository object to be freed.
- Returns None or gives error.
Cache all the objects of a repository’s submodules.
parameters |
Returns |
luagit2_repository |
None |
luagit2_repository
: The repository whose objects are to cached.
Clear all the cache objects of a repository’s submodules.
parameters |
Returns |
luagit2_repository |
None |
luagit2_repository
: The repository whose caches are to be cleared.
Set the repository’s current index.
parameters |
Returns |
luagit2_repository |
NOne |
luagit2_index |
luagit2_repository
: The repository whose index is to be set.
luagit2_index
: The index to be set.
- Returns None or gives error.
Set the repo to be bare.
parameters |
Returns |
luagit2_repository |
None |
luagit2_repository
: The repository to be set bare.
Set the repository’s current config values.
parameters |
Returns |
luagit2_repository |
NOne |
luagit2_config |
luagit2_repository
: The repository whose config is to be set.
luagit2_config
: The config to be set.
- Returns None or gives error.
Set the repository’s current odb.
parameters |
Returns |
luagit2_repository |
NOne |
luagit2_odb |
luagit2_repository
: The repository whose Odb is to be set.
luagit2_odb
: The Odb to be set.
- Returns None or gives error.
Cleans up the repository.
parameters |
Returns |
luagit2_repository |
None |
luagit2_repository
: The repository to be cleaned.