Skip to content

Commit 1235607

Browse files
committed
worktree: lock reason should be const
1 parent 8a8ea1d commit 1235607

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/git2/worktree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ GIT_EXTERN(int) git_worktree_add(git_worktree **out, git_repository *repo,
123123
* @param reason Reason why the working tree is being locked
124124
* @return 0 on success, non-zero otherwise
125125
*/
126-
GIT_EXTERN(int) git_worktree_lock(git_worktree *wt, char *reason);
126+
GIT_EXTERN(int) git_worktree_lock(git_worktree *wt, const char *reason);
127127

128128
/**
129129
* Unlock a locked worktree

src/worktree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ int git_worktree_add(git_worktree **out, git_repository *repo,
383383
return err;
384384
}
385385

386-
int git_worktree_lock(git_worktree *wt, char *creason)
386+
int git_worktree_lock(git_worktree *wt, const char *creason)
387387
{
388388
git_buf buf = GIT_BUF_INIT, path = GIT_BUF_INIT;
389389
int err;

0 commit comments

Comments
 (0)