Commit 853b1407 by Carlos Martín Nieto

branch: constness fixes

parent 2b40390f
......@@ -238,7 +238,7 @@ GIT_EXTERN(int) git_branch_upstream_name(
* error code otherwise.
*/
GIT_EXTERN(int) git_branch_is_head(
git_reference *branch);
const git_reference *branch);
/**
* Return the name of remote that the remote tracking branch belongs to.
......
......@@ -586,7 +586,7 @@ GIT_EXTERN(int) git_reference_ensure_log(git_repository *repo, const char *refna
* @return 1 when the reference lives in the refs/heads
* namespace; 0 otherwise.
*/
GIT_EXTERN(int) git_reference_is_branch(git_reference *ref);
GIT_EXTERN(int) git_reference_is_branch(const git_reference *ref);
/**
* Check if a reference is a remote tracking branch
......
......@@ -588,7 +588,7 @@ on_error:
}
int git_branch_is_head(
git_reference *branch)
const git_reference *branch)
{
git_reference *head;
bool is_same = false;
......
......@@ -1137,7 +1137,7 @@ int git_reference__is_branch(const char *ref_name)
return git__prefixcmp(ref_name, GIT_REFS_HEADS_DIR) == 0;
}
int git_reference_is_branch(git_reference *ref)
int git_reference_is_branch(const git_reference *ref)
{
assert(ref);
return git_reference__is_branch(ref->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment