From 76ccdf33280379b26ec745def5edceb28043d925 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 17 Feb 2020 18:19:03 -0700 Subject: don't drop .git from $upstream in two places Signed-off-by: Sean Whitton --- lib/API/GitForge/GitLab.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/API/GitForge/GitLab.pm b/lib/API/GitForge/GitLab.pm index b264eb9..12d318b 100644 --- a/lib/API/GitForge/GitLab.pm +++ b/lib/API/GitForge/GitLab.pm @@ -70,12 +70,11 @@ sub _ensure_fork { sub _assert_fork_has_parent { my ($self, $upstream) = @_; - my (undef, $repo) = _extract_project_id($upstream); + my ($path, $repo) = _extract_project_id($upstream); my $user = $self->{_api}->current_user->{username}; my $fork = $self->{_api}->project("$user/$repo"); - $upstream =~ s/\.git$//; - $fork->{forked_from_project}{path_with_namespace} eq $upstream + $fork->{forked_from_project}{path_with_namespace} eq $path . "/" . $repo or croak "$user/$repo does not have parent $upstream; don't know what to do"; } -- cgit v1.2.3