summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Germishuys <jacquesg@striata.com>2018-03-02 12:41:04 +0200
committerJacques Germishuys <jacquesg@striata.com>2018-03-02 12:41:04 +0200
commit123560764855067174ed48b652a49737a674f423 (patch)
tree821d1df4ca7e6c201562d3d55e85bef954ea415d
parent8a8ea1db12eeeefe2dc3e192f597df9892588f6a (diff)
downloadlibgit2-123560764855067174ed48b652a49737a674f423.tar.gz
worktree: lock reason should be const
-rw-r--r--include/git2/worktree.h2
-rw-r--r--src/worktree.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/git2/worktree.h b/include/git2/worktree.h
index d3fa88e3f..a2a5d4473 100644
--- a/include/git2/worktree.h
+++ b/include/git2/worktree.h
@@ -123,7 +123,7 @@ GIT_EXTERN(int) git_worktree_add(git_worktree **out, git_repository *repo,
* @param reason Reason why the working tree is being locked
* @return 0 on success, non-zero otherwise
*/
-GIT_EXTERN(int) git_worktree_lock(git_worktree *wt, char *reason);
+GIT_EXTERN(int) git_worktree_lock(git_worktree *wt, const char *reason);
/**
* Unlock a locked worktree
diff --git a/src/worktree.c b/src/worktree.c
index 5a814a2ec..d1e4efbb4 100644
--- a/src/worktree.c
+++ b/src/worktree.c
@@ -383,7 +383,7 @@ out:
return err;
}
-int git_worktree_lock(git_worktree *wt, char *creason)
+int git_worktree_lock(git_worktree *wt, const char *creason)
{
git_buf buf = GIT_BUF_INIT, path = GIT_BUF_INIT;
int err;