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 <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Phillip Wood committed
Jun 30, 2017 at 10:49 UTC
d5f28b724192e9172d0a013dd7b2ca20fd1bbb9b
1 file changed
+2
-2
perl/Git.pm
+2
-2
@@ -1493,8 +1493,8 @@ when not using -z or when parsing the output of diff -u.
1493
$_ = $2;
1494
last;
1495
}
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]");
1498
}
1499
$_ = $remainder;
1500
}