]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/ceph-backport.sh: consume excess forward slash chars 46405/head
authorMichael Fritch <mfritch@suse.com>
Thu, 26 May 2022 18:19:13 +0000 (12:19 -0600)
committerMichael Fritch <mfritch@suse.com>
Wed, 1 Jun 2022 21:39:32 +0000 (15:39 -0600)
when attempting to determine the upstream remote
(e.g. `git@github.com:/ceph/ceph`)

Fixes: https://tracker.ceph.com/issues/55775
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/script/ceph-backport.sh

index 7c4410051f721415d9f8ad919817e5bea5781902..b7e2de30f7dc8b728eb1bde681c1166e6733c68f 100755 (executable)
@@ -787,7 +787,7 @@ function maybe_deduce_remote {
     else
         assert_fail "bad remote_type ->$remote_type<- in maybe_deduce_remote"
     fi
-    remote=$(git remote -v | grep --extended-regexp --ignore-case '(://|@)github.com(/|:)'${url_component}'/ceph(\s|\.|\/)' | head -n1 | cut -f 1)
+    remote=$(git remote -v | grep --extended-regexp --ignore-case '(://|@)github.com(/|:|:/)'${url_component}'/ceph(\s|\.|\/)' | head -n1 | cut -f 1)
     echo "$remote"
 }