diff options
author | Đoàn Trần Công Danh <congdanhqx@gmail.com> | 2022-09-21 15:02:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-09-21 20:00:18 +0200 |
commit | 81580fa06d85ef519a46b0b225cebfe71c168a37 (patch) | |
tree | eb9a13854f1dfbd9d3aa84b51b73a1404c7a7d26 /t/test-lib-functions.sh | |
parent | t: remove \{m,n\} from BRE grep usage (diff) | |
download | git-81580fa06d85ef519a46b0b225cebfe71c168a37.tar.xz git-81580fa06d85ef519a46b0b225cebfe71c168a37.zip |
t: convert egrep usage to "grep -E"
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>
Diffstat (limited to '')
-rw-r--r-- | t/test-lib-functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index c6479f24eb..527a714500 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -897,7 +897,7 @@ test_path_is_symlink () { test_dir_is_empty () { test "$#" -ne 1 && BUG "1 param" test_path_is_dir "$1" && - if test -n "$(ls -a1 "$1" | egrep -v '^\.\.?$')" + if test -n "$(ls -a1 "$1" | grep -E -v '^\.\.?$')" then echo "Directory '$1' is not empty, it contains:" ls -la "$1" |