From cb9aa3f4be76e093ca6377e61daa2fa23f2e5eb0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Sat, 13 Nov 2010 10:43:08 +0100
Subject: [PATCH] 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.
---
 ChangeLog    | 8 ++++++++
 top/maint.mk | 1 +
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index f085a3dc6a..0c4a9fbc79 100644
--- 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
diff --git a/top/maint.mk b/top/maint.mk
index d51944b0c8..65c2f80489 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -820,6 +820,7 @@ sc_prohibit_test_minus_ao:
 # 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)
 
-- 
2.39.5