Skip to content

Commit d5f28b7

Browse files
phillipwoodgitster
authored andcommitted
Git::unquote_path(): throw an exception on bad path
This is what the other routines in Git.pm do if there's an error. Signed-off-by: Phillip Wood <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4cebfac commit d5f28b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

perl/Git.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,8 +1493,8 @@ when not using -z or when parsing the output of diff -u.
14931493
$_ = $2;
14941494
last;
14951495
}
1496-
# This is malformed -- just return it as-is for now.
1497-
return $_[0];
1496+
# This is malformed
1497+
throw Error::Simple("invalid quoted path $_[0]");
14981498
}
14991499
$_ = $remainder;
15001500
}

0 commit comments

Comments
 (0)