Skip to content

Commit

Permalink
git-backport-diff: Replace egrep by grep -E
Browse files Browse the repository at this point in the history
The command `egrep` is now considered obsolete (and prints that to
stderr), replace it by `grep -E`.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
  • Loading branch information
XanClic committed Dec 5, 2022
1 parent d9c095b commit 8235ca6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions git-backport-diff
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,13 @@ compare_git()

if [[ -n "$uphash" ]]
then
numdiff=`diff -u <(git diff --diff-algorithm=patience $DIFFOPTS $uphash^! |egrep ^[-+])\
<(git diff --diff-algorithm=patience $DIFFOPTS $downhash^! |egrep ^[-+])\
| egrep '^[-+]' | egrep -v '^[-+]{3}' |wc -l || true`
numdiff=`diff -u <(git diff --diff-algorithm=patience $DIFFOPTS $uphash^! |grep -E ^[-+])\
<(git diff --diff-algorithm=patience $DIFFOPTS $downhash^! |grep -E ^[-+])\
| grep -E '^[-+]' | grep -E -v '^[-+]{3}' |wc -l || true`
# for contextual diff checking, we will ignore hashes and line number offsets
condiff=`diff -u <(git diff --diff-algorithm=patience $DIFFOPTS $uphash^\! |sed -e s/^@@.*@@//g |egrep -v ^index |egrep -v ^diff)\
<(git diff --diff-algorithm=patience $DIFFOPTS $downhash^\!|sed -e s/^@@.*@@//g |egrep -v ^index |egrep -v ^diff)\
| egrep '^[-+]' | egrep -v '^[-+]{3}'|wc -l || true`
condiff=`diff -u <(git diff --diff-algorithm=patience $DIFFOPTS $uphash^\! |sed -e s/^@@.*@@//g |grep -E -v ^index |grep -E -v ^diff)\
<(git diff --diff-algorithm=patience $DIFFOPTS $downhash^\!|sed -e s/^@@.*@@//g |grep -E -v ^index |grep -E -v ^diff)\
| grep -E '^[-+]' | grep -E -v '^[-+]{3}'|wc -l || true`
f="-"
c="-"
if [[ $sensitivity -gt 1 ]]
Expand Down

0 comments on commit 8235ca6

Please sign in to comment.