summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlosmn@github.com>2021-04-11 21:22:33 +0200
committerEdward Thomson <ethomson@edwardthomson.com>2021-06-30 08:58:12 -0500
commit14985171793345f4d2c4eac310cd3ce93e65f897 (patch)
treea3de6618591a05f18c0942f182cf86df8e302938
parent14ef0f58ea0e68bf48d0ba54bbf0efbd13411b23 (diff)
downloadlibgit2-14985171793345f4d2c4eac310cd3ce93e65f897.tar.gz
repo: specify init.defaultbranch is meant to be a branch name
We don't want the default branch's refname here but its name as branch. Returning an error saying it's not a valid reference here suggests we want the value of `init.defaultbranch` to be something like `refs/heads/default` which is not the case.
-rw-r--r--src/repository.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repository.c b/src/repository.c
index e95adf0e6..d04fd822f 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -2381,7 +2381,7 @@ int git_repository_initialbranch(git_buf *out, git_repository *repo)
goto done;
if (!git_reference_is_valid_name(out->ptr)) {
- git_error_set(GIT_ERROR_INVALID, "the value of init.defaultBranch is not a valid reference name");
+ git_error_set(GIT_ERROR_INVALID, "the value of init.defaultBranch is not a valid branch name");
error = -1;
}