From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btdOI-0002fM-TD for qemu-devel@nongnu.org; Mon, 10 Oct 2016 12:25:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btdOD-0001EY-JN for qemu-devel@nongnu.org; Mon, 10 Oct 2016 12:25:25 -0400 References: <1475829975-17413-1-git-send-email-anand.indukala@gmail.com> <290de67f-8505-fbd7-c2fa-6fbe7ca604eb@redhat.com> <45036bfe-789a-3f56-4b24-a507b9e9140a@redhat.com> From: Eric Blake Message-ID: <84deb988-1a31-c82f-a4d3-5ef8ebfb8dbb@redhat.com> Date: Mon, 10 Oct 2016 11:25:19 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k2PPie6nFOXx3BDlKm4JbxCsS6q8VTHsJ" Subject: Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anand J Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --k2PPie6nFOXx3BDlKm4JbxCsS6q8VTHsJ From: Eric Blake To: Anand J Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Message-ID: <84deb988-1a31-c82f-a4d3-5ef8ebfb8dbb@redhat.com> Subject: Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes References: <1475829975-17413-1-git-send-email-anand.indukala@gmail.com> <290de67f-8505-fbd7-c2fa-6fbe7ca604eb@redhat.com> <45036bfe-789a-3f56-4b24-a507b9e9140a@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/09/2016 04:33 AM, Anand J wrote: >>> grep -r --exclude-dir=3Dbin/ "#include" | sort | uniq -c | awk '{if (= $1 > >> 1) >>> print $2}' >> >> Seems simple enough that we ought to make it part of the >> scripts/clean-includes, rather than remembering to manually run it. >> >=20 > scripts/clean-includes does an in place modification of the duplicate > entries in the files. > There is no guarantee that my script with return all genuine duplicate > entries. Some can be false positive as well. If you don't trust an in-place modification, then maybe it is simple enough to just make scripts/clean-includes fail with non-zero status and flag that the files need manual attention, then rerunning the script. But still, having the script be able to flag the problems, whether or not it can fix them, is better than making it a comment where no one remembers to manually run the comment. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --k2PPie6nFOXx3BDlKm4JbxCsS6q8VTHsJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX+8DvAAoJEKeha0olJ0NqPJwH/0s+OQzLMnD6/5VosRZmluKQ nY6PWB6D+/PtL01C3BIpaeGyCWLNEGhF7saScCKSUJmctPe6GOC2HhPHB904mope Agp/v9pMWNqtTVYSwH8kpIHmVcGrYsMWwBRx8+fvh+qSaZoUhsehAWxrQkAruN+I XpSyDJDW68lmOBSm4sETomWhaYBlEzWMqyMBmxF+gdsKe1AuVSAQk+wwQ3sybgW8 lOnwYKJBevb7cRHpbTfSuvROFdVa1bXHB7PMGOphQ8vqVWiUsqQV59wxa0aThze9 8LJ93Zz4k8E2dCcmrjuW9zwwGMuP245mXSKWvRR4w1CJLNCSRlafhYjztpzx398= =aGLG -----END PGP SIGNATURE----- --k2PPie6nFOXx3BDlKm4JbxCsS6q8VTHsJ--