summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlosmn@github.com>2021-04-11 21:22:33 +0200
committerCarlos Martín Nieto <carlosmn@github.com>2021-04-11 21:22:33 +0200
commit631fe56faeb0acc600074b89eaeca93e548d3e12 (patch)
tree8b23d65f7845257d5931a4b742f11d44e8457543
parent34b9a04c77235dfc9401cb7ef8efc6c4ee7e99dd (diff)
downloadlibgit2-cmn/branch-or-ref.tar.gz
repo: specify init.defaultbranch is meant to be a branch namecmn/branch-or-ref
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 2c8b8192e..124722bba 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -2401,7 +2401,7 @@ int git_repository_initialbranch(git_buf *out, git_repository *repo)
goto done;
if (!valid) {
- 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;
}