Subject: Re: bug#17668: [PATCH] build: be more specific about .git directory before enabling warnings

From: Eric Blake <[email-masked]>
Date: Mon, 02 Jun 2014 10:31:03 -0600

On 06/02/2014 02:54 AM, Ben Walton wrote:
>   * configure.ac: When looking for a .git checkout, restrict it to git
>     checkouts that contain a coreutils-specific tag.
> 
> Signed-off-by: Ben Walton <[email-masked]>
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index a7a8bfc..96af9be 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -100,7 +100,7 @@ AC_ARG_ENABLE([gcc-warnings],
>     # we're running from a git repo, then auto enable the warnings.
>     gl_gcc_warnings=no
>     gl_GCC_VERSION_IFELSE([4], [6],
> -                         [test -d "$srcdir"/.git && gl_gcc_warnings=yes])]
> +                         [test -f "$srcdir"/.git/refs/tags/v8.22 && gl_gcc_warnings=yes])]

NACK.  Git can compress tags to reside in other locations than
.git/refs/tags (run 'git gc --aggressive' for example).  The idea of
testing for coreutils.git has merit, but you need to come up with a more
robust test.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org