Skip to content

Commit 631fe56

Browse files
committed
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.
1 parent 34b9a04 commit 631fe56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/repository.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2401,7 +2401,7 @@ int git_repository_initialbranch(git_buf *out, git_repository *repo)
24012401
goto done;
24022402

24032403
if (!valid) {
2404-
git_error_set(GIT_ERROR_INVALID, "the value of init.defaultBranch is not a valid reference name");
2404+
git_error_set(GIT_ERROR_INVALID, "the value of init.defaultBranch is not a valid branch name");
24052405
error = -1;
24062406
}
24072407

0 commit comments

Comments
 (0)