From 89a638153099518162f8fa172f8ca56075efe3c6 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 29 Jan 2018 05:00:33 +0000 Subject: [PATCH] fixed a missing caret bug in pre-commit.in --- codepot/etc/pre-commit.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codepot/etc/pre-commit.in b/codepot/etc/pre-commit.in index cb98eed5..0fb2f07e 100644 --- a/codepot/etc/pre-commit.in +++ b/codepot/etc/pre-commit.in @@ -460,7 +460,7 @@ sub restrict_changes_in_topdirs foreach my $topdir(@topdirs) { - if ($affected_file =~ /\/${topdir}\/(.*)$/) + if ($affected_file =~ /^\/${topdir}\/(.*)$/) { # the affected file is located under the given directory. my $affected_file_nodir = "${1}";