[PATCH] dim: Don't escape forward slash for grep
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Feb 8 01:32:43 UTC 2023
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
GNU grep 3.8 started to complain about backslashes where
they're not needed:
grep: warning: stray \ before /
Get rid of them.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
dim | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dim b/dim
index b87b54259f8b..296feb9dd314 100755
--- a/dim
+++ b/dim
@@ -503,7 +503,7 @@ function dim_retip
if repo_to_remote drm-tip &> /dev/null ; then
new_upstream=$(repo_to_remote drm-tip)/drm-tip
else
- new_upstream=$(git branch -r | grep '\/drm-tip$')
+ new_upstream=$(git branch -r | grep '/drm-tip$')
fi
upstream=$(git_find_tip "$branch")
@@ -1124,12 +1124,12 @@ function check_diff_prefix
local rv patch msg patch_recoded
patch="$1"
- rv=$(grep -q -E "^diff --git a\/.+ b\/.+$" $patch)
+ rv=$(grep -q -E "^diff --git a/.+ b/.+$" $patch)
if [ -z "$rv" ]; then
msg=$(mktemp --tmpdir dim-msg.XXXXXX)
patch_recoded=$(mktemp --tmpdir dim-patch.XXXXXX)
git mailinfo "$msg" "$patch_recoded" < $patch >/dev/null
- rv=$(grep -q -E "^diff --git a\/.+ b\/.+$" $patch_recoded)
+ rv=$(grep -q -E "^diff --git a/.+ b/.+$" $patch_recoded)
rm "$msg" "$patch_recoded"
fi
--
2.39.1
More information about the dim-tools
mailing list