Skip to content

Commit 786a935

Browse files
fix inconsistency in error message for windows system invalid file names when creating a new branch
Signed-off-by: Whitney Schmidt <[email protected]>
1 parent ad95d13 commit 786a935

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

refs.c

+3
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ static int check_or_sanitize_refname(const char *refname, int flags,
167167
{
168168
int component_len, component_count = 0;
169169

170+
if (!is_valid_path(refname))
171+
return -1;
172+
170173
if (!strcmp(refname, "@")) {
171174
/* Refname is a single character '@'. */
172175
if (sanitized)

0 commit comments

Comments
 (0)