summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2017-06-30 09:49:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-30 15:04:59 (GMT)
commitd5f28b724192e9172d0a013dd7b2ca20fd1bbb9b (patch)
tree366ee878004c74775f7f783f5c724df2ef0dfa4a /perl
parent4cebfac94412ccbd077c6776f7c8db1914bafde2 (diff)
downloadgit-d5f28b724192e9172d0a013dd7b2ca20fd1bbb9b.zip
git-d5f28b724192e9172d0a013dd7b2ca20fd1bbb9b.tar.gz
git-d5f28b724192e9172d0a013dd7b2ca20fd1bbb9b.tar.bz2
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>
Diffstat (limited to 'perl')
-rw-r--r--perl/Git.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl/Git.pm b/perl/Git.pm
index 3179e6e..f4b56e6 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -1493,8 +1493,8 @@ when not using -z or when parsing the output of diff -u.
$_ = $2;
last;
}
- # This is malformed -- just return it as-is for now.
- return $_[0];
+ # This is malformed
+ throw Error::Simple("invalid quoted path $_[0]");
}
$_ = $remainder;
}