diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-03-17 16:10:33 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-03-17 17:47:46 +0100 |
commit | 853b1407c0325f6690eab92746d1f53c78b0da49 (patch) | |
tree | 6258d503486610106af8300dd2a346eebd204ee5 | |
parent | 2b40390f226ac8ba516fdf0d893e0b5a29857dc7 (diff) | |
download | libgit2-853b1407c0325f6690eab92746d1f53c78b0da49.tar.gz |
branch: constness fixes
-rw-r--r-- | include/git2/branch.h | 2 | ||||
-rw-r--r-- | include/git2/refs.h | 2 | ||||
-rw-r--r-- | src/branch.c | 2 | ||||
-rw-r--r-- | src/refs.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h index 46aef3206..d2762019b 100644 --- a/include/git2/branch.h +++ b/include/git2/branch.h @@ -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. diff --git a/include/git2/refs.h b/include/git2/refs.h index 65449e69e..1bbb4ca46 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -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 diff --git a/src/branch.c b/src/branch.c index 7c888729d..df665a469 100644 --- a/src/branch.c +++ b/src/branch.c @@ -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; diff --git a/src/refs.c b/src/refs.c index e63796c94..8b6e09a33 100644 --- a/src/refs.c +++ b/src/refs.c @@ -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); |