mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
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.
This commit is contained in:
committed by
Edward Thomson
parent
14ef0f58ea
commit
1498517179
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user