4. Branch
These methods allows user to work with git branches
of a given repository.
These help to create, delete, iterate over list of branches
and setting upstreams for a branch.
parameters |
Returns |
luagit2_repository |
luagit2_reference |
branch_name (string) |
luagit2_commit |
force (int) |
luagit2_repository
: The repository to create a new branch in.
branch_name
: the name of new branch to create .
luagit2_commit
: the last commit using which the branch will be created.
force
: integer equivalent of boolean whether or not force create a new branch.
parameters |
Returns |
luagit2_repository |
luagit2_reference |
branch_name (string) |
luagit2_annotated_commit |
force (int) |
luagit2_repository
: The repository to create a new branch in.
branch_name
: the name of new branch to create .
luagit2_annotated_commit
: the annptated commit using which the branch will be created.
force
: integer equivalent of boolean whether or not force create a new branch.
parameters |
Returns |
luagit2_reference |
None |
luagit2_reference
: The reference for the branch which is to be deleted.
parameters |
Returns |
luagit2_reference |
Boolean |
luagit2_reference
: The reference for the branch which to check.
parameters |
Returns |
luagit2_reference |
Boolean |
luagit2_reference
: The reference for the branch which to check.
parameters |
Returns |
luagit2_repository |
luagit2_branch_iterator |
luagit2_branch_type |
luagit2_repository
: The repository to look for the list of branches.
luagit2_branch_type
: the type of branches to look .It can be either LOCAL or REMOTE. It can be created using luagit2’s branch helper methods get_type_GIT_BRANCH_LOCAL
& get_type_GIT_BRANCH_REMOTE
.
parameters |
Returns |
luagit2_repository |
luagit2_reference |
branch_name (string) |
luagit2_branch_type |
luagit2_repository
: The repository to look into for the given branch.
branch_name
: the path to the blob in repository .
luagit2_branch_type
: the type of branches to look . It can be either LOCAL or REMOTE. It can be created using luagit2’s branch helper methods get_type_GIT_BRANCH_LOCAL
& get_type_GIT_BRANCH_REMOTE
.
parameters |
Returns |
luagit2_reference |
luagit2_reference |
new_branch_name (string) |
force (int) |
luagit2_reference
: The reference for the branch which is to be moved to a new name.
new_branch_name
: The new branch name.
force
: integer equivalent of bool to force branch moving.
parameters |
Returns |
luagit2_reference |
String (name) |
luagit2_reference
: The reference for the branch whose name is to be found.
parameters |
Returns |
luagit2_branch_type |
luagit2_reference |
luagit2_branch_iterator |
luagit2_branch_type
: The type of branches to look .It can be either LOCAL or REMOTE. It can be created using luagit2’s branch helper methods get_type_GIT_BRANCH_LOCAL
& get_type_GIT_BRANCH_REMOTE
.
luagit2_branch_iterator
: The branch iterator that contains list of all branches .
parameters |
Returns |
luagit2_reference |
None |
upstream_name(string) |
luagit2_reference
: The reference for the branch.
upstream_name
: The upstream’s name.
parameters |
Returns |
luagit2_reference |
luagit2_reference |
luagit2_reference
: The reference for the branch whose upstream branch is to be found.