]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
script/ceph-backport: Remove stray `\` from grep command 61233/head
authorAnoop C S <anoopcs@cryptolab.net>
Fri, 3 Jan 2025 11:58:18 +0000 (17:28 +0530)
committerAnoop C S <anoopcs@cryptolab.net>
Tue, 14 Jan 2025 06:06:50 +0000 (11:36 +0530)
GNU grep v3.8 release notes[1] has the following mention about the usage
of backslashes:

"Regular expressions with stray backslashes now cause warnings, as their
unspecified behavior can lead to unexpected results."
. . .
"The warnings are intended as a transition aid; they are likely to be
errors in future releases."

As a result we see the warning "grep: warning: stray \ before /" during
script execution. Therefore remove the extra `\` from grep command.

[1] https://git.savannah.gnu.org/cgit/grep.git/tree/NEWS#n85

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
src/script/ceph-backport.sh

index c216ed32d9bdc6944eaa85f24305523128163766..81b9fc362fc499539e19af04228a903db5c04b18 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"
 }