From 677f2c478ccc89aa2f30c4407e26bc568d8b5532 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Thu, 10 Nov 2011 22:11:19 +0000 Subject: [PATCH] Remove trailing slash from MR_REPO. This avoids double slashes in paths used in: (a) the built-in shell code in the __DATA__ section, e.g. svn_test = test -d "$MR_REPO"/.svn git_test = test -d "$MR_REPO"/.git (b) lib/git-fake-bare, e.g. git_fake_bare_test = test -d "$MR_REPO"/refs/heads && test -d "$MR_REPO"/refs/tags && (c) lib/vcsh, e.g. vcsh_test = test -d "$MR_REPO"/refs/heads && test -d "$MR_REPO"/refs/tags && I have audited all uses and cannot see any which depend on the trailing slash being there. (cherry picked from commit 2e350ca416572a37df3393d50c91a02b44d9137b) --- mr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mr b/mr index 3a168d1..fc63605 100755 --- a/mr +++ b/mr @@ -602,7 +602,7 @@ sub action { my $is_checkout=($action eq 'checkout'); my $is_update=($action =~ /update/); - $ENV{MR_REPO}=$dir; + ($ENV{MR_REPO}=$dir) =~ s!/$!!; $ENV{MR_ACTION}=$action; foreach my $testname ("skip", "deleted") { -- 2.39.2