changeset 13858:7e07f3f002ba

maint.mk: tighten "test a == b" check * top/maint.mk (sc_prohibit_test_double_equal): Restrict this test to files that contain something like #!/bin/sh. Without this, coreutils would get two false positives in the comments of C source files.
author Jim Meyering <meyering@redhat.com>
date Sat, 13 Nov 2010 10:43:08 +0100
parents 7dd89a91e8f7
children 5977784139a5
files ChangeLog top/maint.mk
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-11-13  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: tighten "test a == b" check
+	* top/maint.mk (sc_prohibit_test_double_equal): Restrict this
+	test to files that contain something like #!/bin/sh.
+	Without this, coreutils would get two false positives in
+	the comments of C source files.
+
 2010-11-12  Eric Blake  <eblake@redhat.com>
 
 	bootstrap: fix typo in previous attempt
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -820,6 +820,7 @@
 # Avoid a test bashism.
 sc_prohibit_test_double_equal:
 	@prohibit='(\<test| \[+) .+ == '				\
+	containing='^#! */bin/sh'					\
 	halt='use "test x = x", not "test x =''= x"'			\
 	  $(_sc_search_regexp)