Skip to content

Commit

Permalink
fix inconsistency in error message for windows system invalid file na…
Browse files Browse the repository at this point in the history
…mes when creating a new branch

Signed-off-by: Whitney Schmidt <whschm@microsoft.com>
  • Loading branch information
whitneyschmidt committed Nov 23, 2020
1 parent ad95d13 commit 786a935
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ static int check_or_sanitize_refname(const char *refname, int flags,
{
int component_len, component_count = 0;

if (!is_valid_path(refname))
return -1;

if (!strcmp(refname, "@")) {
/* Refname is a single character '@'. */
if (sanitized)
Expand Down

0 comments on commit 786a935

Please sign in to comment.