About to make a grep release, I hit the seemingly-spurious failure of
the public-submodule-commit rule.  It ended up being due to the
version (built from git.git) of git I was using on that system.

I haven't traced the change to a precise git version, but did confirm
that 1.7.10.2 and 1.8.1.4 both work with the fixed quoting.
From 7a0c729aacc3716a665ce3b0c8cb34843bdecc75 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyer...@fb.com>
Date: Wed, 1 Jan 2014 20:25:44 -0800
Subject: [PATCH] maint: fix public-submodule-commit to work with newer git

* top/maint.mk (public-submodule-commit): Remove excess quoting.
We were over-quoting the test arguments, and somewhere prior to
version 1.8.5.2.229, git stopped removing those excess quotes,
which made the test fail, since the unexpanded strings would
always differ; using GIT_TRACE=1 confirmed that the git merge-base
command wasn't even being run.
---
 ChangeLog    | 10 ++++++++++
 top/maint.mk |  4 ++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4335802..c3f5dc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-01-01  Jim Meyering  <meyer...@fb.com>
+
+       maint: fix public-submodule-commit to work with newer git
+       * top/maint.mk (public-submodule-commit): Remove excess quoting.
+       We were over-quoting the test arguments, and somewhere prior to
+       version 1.8.5.2.229, git stopped removing those excess quotes,
+       which made the test fail, since the unexpanded strings would
+       always differ; using GIT_TRACE=1 confirmed that the git merge-base
+       command wasn't even being run.
+
 2014-01-01  Paul Eggert  <egg...@cs.ucla.edu>

        doc: update main copyright year
diff --git a/top/maint.mk b/top/maint.mk
index 7420af5..cae2dda 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1395,8 +1395,8 @@ public-submodule-commit:
                && git --version >/dev/null 2>&1; then                  \
          cd $(srcdir) &&                                               \
          git submodule --quiet foreach                                 \
-             test '"$$(git rev-parse "$$sha1")"'                       \
-             = '"$$(git merge-base origin "$$sha1")"'                  \
+             'test "$$(git rev-parse "$$sha1")"                        \
+                 = "$$(git merge-base origin "$$sha1")"'               \
            || { echo '$(ME): found non-public submodule commit' >&2;   \
                 exit 1; };                                             \
        else                                                            \
-- 
1.8.5.2.229.g4448466

Reply via email to