]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script/ceph-backport: allow hyphen in project during ceph fork deduction 61149/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 19 Dec 2024 17:11:06 +0000 (12:11 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Thu, 19 Dec 2024 17:11:06 +0000 (12:11 -0500)
This will allow the fork deduction code to recognize project names
that include a hyphen, such as:

    git@github.com:USERNAME/ceph-fork.git

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/script/ceph-backport.sh

index a56509e3d3abd17ca134f687df843bac53d59479..c216ed32d9bdc6944eaa85f24305523128163766 100755 (executable)
@@ -779,7 +779,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"
 }