Git fork

t: convert fgrep usage to "grep -F"

Despite POSIX states that:

> The old egrep and fgrep commands are likely to be supported for many
> years to come as implementation extensions, allowing historical
> applications to operate unmodified.

GNU grep 3.8 started to warn[1]:

> The egrep and fgrep commands, which have been deprecated since
> release 2.5.3 (2007), now warn that they are obsolescent and should
> be replaced by grep -E and grep -F.

Prepare for their removal in the future.

[1]: https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Đoàn Trần Công Danh and committed by
Junio C Hamano
37eb90f7 81580fa0

+16 -16
+1 -1
t/t3700-add.sh
··· 291 291 git reset --hard && 292 292 touch fo\[ou\]bar foobar && 293 293 git add '\''fo\[ou\]bar'\'' && 294 - git ls-files fo\[ou\]bar | fgrep fo\[ou\]bar && 294 + git ls-files fo\[ou\]bar | grep -F fo\[ou\]bar && 295 295 ! ( git ls-files foobar | grep foobar ) 296 296 ' 297 297
+2 -2
t/t7003-filter-branch.sh
··· 49 49 test_expect_success 'rewrite bare repository identically' ' 50 50 (git config core.bare true && cd .git && 51 51 git filter-branch branch > filter-output 2>&1 && 52 - ! fgrep fatal filter-output) 52 + ! grep fatal filter-output) 53 53 ' 54 54 git config core.bare false 55 55 test_expect_success 'result is really identical' ' ··· 506 506 git tag -a -m "tag to a tree" treetag $new_tree && 507 507 git reset --hard HEAD && 508 508 git filter-branch -f -- --all >filter-output 2>&1 && 509 - ! fgrep fatal filter-output 509 + ! grep fatal filter-output 510 510 ' 511 511 512 512 test_expect_success 'filter-branch handles ref deletion' '
+3 -3
t/t9133-git-svn-nested-git-repo.sh
··· 35 35 echo b >> a && 36 36 svn_cmd commit -m "SVN-side change outside of .git" && 37 37 svn_cmd up && 38 - svn_cmd log -v | fgrep "SVN-side change outside of .git" 38 + svn_cmd log -v | grep -F "SVN-side change outside of .git" 39 39 ) 40 40 ' 41 41 ··· 59 59 svn_cmd add --force .git && 60 60 svn_cmd commit -m "SVN-side change inside of .git" && 61 61 svn_cmd up && 62 - svn_cmd log -v | fgrep "SVN-side change inside of .git" 62 + svn_cmd log -v | grep -F "SVN-side change inside of .git" 63 63 ) 64 64 ' 65 65 ··· 82 82 git commit -m "add a inside an SVN repo" && 83 83 svn_cmd commit -m "SVN-side change in and out of .git" && 84 84 svn_cmd up && 85 - svn_cmd log -v | fgrep "SVN-side change in and out of .git" 85 + svn_cmd log -v | grep -F "SVN-side change in and out of .git" 86 86 ) 87 87 ' 88 88
+4 -4
t/t9134-git-svn-ignore-paths.sh
··· 43 43 test_expect_success 'verify ignore-paths config saved by clone' ' 44 44 ( 45 45 cd g && 46 - git config --get svn-remote.svn.ignore-paths | fgrep "www" 46 + git config --get svn-remote.svn.ignore-paths | grep www 47 47 ) 48 48 ' 49 49 ··· 53 53 echo b >> qqq/test_qqq.txt && 54 54 svn_cmd commit -m "SVN-side change outside of www" && 55 55 svn_cmd up && 56 - svn_cmd log -v | fgrep "SVN-side change outside of www" 56 + svn_cmd log -v | grep "SVN-side change outside of www" 57 57 ) 58 58 ' 59 59 ··· 85 85 echo zaq >> www/test_www.txt && 86 86 svn_cmd commit -m "SVN-side change inside of www/test_www.txt" && 87 87 svn_cmd up && 88 - svn_cmd log -v | fgrep "SVN-side change inside of www/test_www.txt" 88 + svn_cmd log -v | grep -F "SVN-side change inside of www/test_www.txt" 89 89 ) 90 90 ' 91 91 ··· 118 118 echo ygg >> qqq/test_qqq.txt && 119 119 svn_cmd commit -m "SVN-side change in and out of ignored www" && 120 120 svn_cmd up && 121 - svn_cmd log -v | fgrep "SVN-side change in and out of ignored www" 121 + svn_cmd log -v | grep "SVN-side change in and out of ignored www" 122 122 ) 123 123 ' 124 124
+2 -2
t/t9140-git-svn-reset.sh
··· 43 43 git svn find-rev refs/remotes/git-svn > ../expect && 44 44 test_must_fail git svn fetch 2> ../errors && 45 45 git svn find-rev refs/remotes/git-svn > ../expect2 ) && 46 - fgrep "not found in commit" errors && 46 + grep "not found in commit" errors && 47 47 test_cmp expect expect2 48 48 ' 49 49 ··· 59 59 ( cd g && 60 60 git svn fetch && 61 61 git svn rebase && 62 - fgrep "mod hidden" hid/hid.txt 62 + grep "mod hidden" hid/hid.txt 63 63 ) 64 64 ' 65 65
+4 -4
t/t9147-git-svn-include-paths.sh
··· 45 45 test_expect_success 'verify include-paths config saved by clone' ' 46 46 ( 47 47 cd g && 48 - git config --get svn-remote.svn.include-paths | fgrep "qqq" 48 + git config --get svn-remote.svn.include-paths | grep qqq 49 49 ) 50 50 ' 51 51 ··· 55 55 echo b >> qqq/test_qqq.txt && 56 56 svn_cmd commit -m "SVN-side change outside of www" && 57 57 svn_cmd up && 58 - svn_cmd log -v | fgrep "SVN-side change outside of www" 58 + svn_cmd log -v | grep "SVN-side change outside of www" 59 59 ) 60 60 ' 61 61 ··· 87 87 echo zaq >> www/test_www.txt && 88 88 svn_cmd commit -m "SVN-side change inside of www/test_www.txt" && 89 89 svn_cmd up && 90 - svn_cmd log -v | fgrep "SVN-side change inside of www/test_www.txt" 90 + svn_cmd log -v | grep "SVN-side change inside of www/test_www.txt" 91 91 ) 92 92 ' 93 93 ··· 120 120 echo ygg >> qqq/test_qqq.txt && 121 121 svn_cmd commit -m "SVN-side change in and out of ignored www" && 122 122 svn_cmd up && 123 - svn_cmd log -v | fgrep "SVN-side change in and out of ignored www" 123 + svn_cmd log -v | grep "SVN-side change in and out of ignored www" 124 124 ) 125 125 ' 126 126