On 11/20/2012 09:27 PM, Théophile Ranquet wrote:
> Hi Stefano, hello Gnulibers,
> 
> (For more context about this, see
> http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00022.html)
> 

> +2012-11-20  Theophile Ranquet <ranq...@lrde.epita.fr>
> +
> +     maint.mk: avoid gratuitous failure
> +     Reported by Stefano Lattarini in
> +     <http://lists.gnu.org/archive/html/bug-bison/2012-11/msg00022.html>
> +     * top/maint.mk (public-submodule-commit): Quote more safely.

Thanks; I've applied this.

> +
>  2012-11-17  Dmitry V. Levin  <l...@altlinux.org>
>  
>       fts: introduce FTS_VERBATIM
> diff --git a/top/maint.mk b/top/maint.mk
> index ea44ece..cd365e7 100644
> --- a/top/maint.mk
> +++ b/top/maint.mk
> @@ -1390,8 +1390,9 @@ submodule-checks ?= no-submodule-changes 
> public-submodule-commit
>  public-submodule-commit:
>       $(AM_V_GEN)if test -d $(srcdir)/.git; then                      \
>         cd $(srcdir) &&                                               \
> -       git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \
> -           = '$$(git merge-base origin $$sha1)'                      \
> +       git submodule --quiet foreach                                 \
> +           test '"$$(git rev-parse "$$sha1")"'                       \

Technically, $$sha1 does not need to be further quoted ('git submodule
foreach' guarantees that it will be defined as an alphanumeric string
that needs no quoting), but it does not hurt to quote.  But you are
correct that the outer $$() sequences need quoting to protect the
unexpected case of no output.

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to