From a80a0d44f31542054b7dcb78ebf935a51146fc52 Mon Sep 17 00:00:00 2001 From: Greg Back Date: Mon, 20 Jul 2020 16:20:59 -0400 Subject: [PATCH] Remove `:(glob)` when used as branch name. --- lib/ES/Repo.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ES/Repo.pm b/lib/ES/Repo.pm index e11ce863914f9..e0e2441e66373 100644 --- a/lib/ES/Repo.pm +++ b/lib/ES/Repo.pm @@ -190,13 +190,14 @@ sub _prepare_sub_dir { my $merge_branch = "${resolved_branch}_${subbed_head}_$path"; $merge_branch =~ s|/|_|g; $merge_branch =~ s|\*|splat|g; + $merge_branch =~ s|:\(glob\)|_glob_|g; $merge_branch =~ s|\.$||g; # Fix funny shaped paths # Check if we've already merged this path by looking for the merged_branch # in the source repo. This is safe because: # 1. We prune all branches from the source repo before the build. # 2. The merge branch contains the hash of the subbed head. - my $already_built = eval { + my $already_built = eval { local $ENV{GIT_DIR} = $self->{git_dir}; run qw(git rev-parse), $merge_branch; 1;