{"thread":{"id":"53494","subject":"[PATCH 4/7] Use strtoumax instead of strtoull.","startedAt":"2020-05-18T10:04:11Z","lastAt":"2020-05-20T03:19:41Z","messageCount":24,"participants":["Darren Tucker","Andreas Schwab","Đoàn Trần Công Danh","Junio C Hamano","Christian Couder","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"398055","messageId":"20200518100356.29292-4-dtucker@dtucker.net","threadId":"53494","inReplyTo":"20200518100356.29292-1-dtucker@dtucker.net","subject":"[PATCH 4/7] Use strtoumax instead of strtoull.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T10:03:53Z","receivedAt":"2020-05-18T10:04:11Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"strtoumax is in the compat library so this works on platforms that don't\nhave a native strtoull.\n\nSigned-off-by: Darren Tucker <dtucker@dtucker.net>\n---\n t/helper/test-progress.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/t/helper/test-progress.c b/t/helper/test-progress.c\nindex 5d05cbe789..3e9eb2abe3 100644\n--- a/t/helper/test-progress.c\n+++ b/t/helper/test-progress.c\n@@ -47,7 +47,7 @@ int cmd__progress(int argc, const char **argv)\n \t\tchar *end;\n \n \t\tif (skip_prefix(line.buf, \"progress \", (const char **) &end)) {\n-\t\t\tuint64_t item_count = strtoull(end, &end, 10);\n+\t\t\tuint64_t item_count = strtoumax(end, &end, 10);\n \t\t\tif (*end != '\\0')\n \t\t\t\tdie(\"invalid input: '%s'\\n\", line.buf);\n \t\t\tdisplay_progress(progress, item_count);\n@@ -55,10 +55,10 @@ int cmd__progress(int argc, const char **argv)\n \t\t\t\t       (const char **) &end)) {\n \t\t\tuint64_t byte_count, test_ms;\n \n-\t\t\tbyte_count = strtoull(end, &end, 10);\n+\t\t\tbyte_count = strtoumax(end, &end, 10);\n \t\t\tif (*end != ' ')\n \t\t\t\tdie(\"invalid input: '%s'\\n\", line.buf);\n-\t\t\ttest_ms = strtoull(end + 1, &end, 10);\n+\t\t\ttest_ms = strtoumax(end + 1, &end, 10);\n \t\t\tif (*end != '\\0')\n \t\t\t\tdie(\"invalid input: '%s'\\n\", line.buf);\n \t\t\tprogress_test_ns = test_ms * 1000 * 1000;\n-- \n2.21.3\n\n"},{"id":"398056","messageId":"20200518100356.29292-5-dtucker@dtucker.net","threadId":"53494","inReplyTo":"20200518100356.29292-1-dtucker@dtucker.net","subject":"[PATCH 5/7] Define LLONG_MAX/MIN etc if not already defined.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T10:03:54Z","receivedAt":"2020-05-18T10:04:12Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"Signed-off-by: Darren Tucker <dtucker@dtucker.net>\n---\n git-compat-util.h | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 8ba576e81e..aa221eba1b 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -127,6 +127,22 @@\n /* Approximation of the length of the decimal representation of this type. */\n #define decimal_length(x)\t((int)(sizeof(x) * 2.56 + 0.5) + 1)\n \n+#ifndef SIZE_MAX\n+#define SIZE_MAX ((size_t)maximum_signed_value_of_type(size_t))\n+#endif\n+\n+#ifndef LLONG_MIN\n+#define LLONG_MIN ((long long)minimum_signed_value_of_type(long long))\n+#endif\n+\n+#ifndef LLONG_MAX\n+#define LLONG_MAX ((long long)maximum_signed_value_of_type(long long))\n+#endif\n+\n+#ifndef ULLONG_MAX\n+#define ULLONG_MAX ((unsigned long long)maximum_unsigned_value_of_type(unsigned long long))\n+#endif\n+\n #if defined(__sun__)\n  /*\n   * On Solaris, when _XOPEN_EXTENDED is set, its header file\n-- \n2.21.3\n\n"},{"id":"398058","messageId":"20200518100356.29292-6-dtucker@dtucker.net","threadId":"53494","inReplyTo":"20200518100356.29292-1-dtucker@dtucker.net","subject":"[PATCH 6/7] Check if strtoumax is a macro (eg HP-UX 11.11).","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T10:03:55Z","receivedAt":"2020-05-18T10:04:15Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"Signed-off-by: Darren Tucker <dtucker@dtucker.net>\n---\n configure.ac | 10 ++++++++--\n 1 file changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 14e09b04b6..87a39c5ae0 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1164,10 +1164,16 @@ GIT_CHECK_FUNC(strtoull,\n [NO_STRTOULL=YesPlease])\n GIT_CONF_SUBST([NO_STRTOULL])\n #\n-# Define NO_STRTOUMAX if you don't have strtoumax in the C library.\n+# Define NO_STRTOUMAX if you don't have strtoumax in the C library\n+# or as a macro in inttypes.h.\n GIT_CHECK_FUNC(strtoumax,\n [NO_STRTOUMAX=],\n-[NO_STRTOUMAX=YesPlease])\n+[\n+\tAC_CHECK_DECL(strtoumax,\n+\t[NO_STRTOUMAX=],\n+\t[NO_STRTOUMAX=YesPlease],\n+\t[#include <inttypes.h>])\n+])\n GIT_CONF_SUBST([NO_STRTOUMAX])\n #\n # Define NO_SETENV if you don't have setenv in the C library.\n-- \n2.21.3\n\n"},{"id":"398057","messageId":"20200518100356.29292-2-dtucker@dtucker.net","threadId":"53494","inReplyTo":"20200518100356.29292-1-dtucker@dtucker.net","subject":"[PATCH 2/7] Define NO_PREAD for HPUX 11.11 and 11.00.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T10:03:51Z","receivedAt":"2020-05-18T10:04:16Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"Tested on 11.11 but probably needed for 11.00 too.\n\nSigned-off-by: Darren Tucker <dtucker@dtucker.net>\n---\n config.mak.uname | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 5ad43c80b1..e864e04346 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -368,9 +368,14 @@ ifeq ($(uname_S),HP-UX)\n \tNO_SYS_SELECT_H = YesPlease\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tNO_NSEC = YesPlease\n+\tifeq ($(uname_R),B.11.11)\n+\t\tNO_PREAD = YesPlease\n+\t\tCFLAGS = -D_REENTRANT\n+\tendif\n \tifeq ($(uname_R),B.11.00)\n \t\tNO_INET_NTOP = YesPlease\n \t\tNO_INET_PTON = YesPlease\n+\t\tNO_PREAD = YesPlease\n \tendif\n \tifeq ($(uname_R),B.10.20)\n \t\t# Override HP-UX 11.x setting:\n-- \n2.21.3\n\n"},{"id":"398059","messageId":"20200518100356.29292-3-dtucker@dtucker.net","threadId":"53494","inReplyTo":"20200518100356.29292-1-dtucker@dtucker.net","subject":"[PATCH 3/7] Test for strtoull in configure.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T10:03:52Z","receivedAt":"2020-05-18T10:04:18Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"It's already used in compat/strtoimax.c\n\nSigned-off-by: Darren Tucker <dtucker@dtucker.net>\n---\n configure.ac | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 4effc82b76..14e09b04b6 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -1158,6 +1158,12 @@ AC_CHECK_TYPE(uintmax_t,\n ])\n GIT_CONF_SUBST([NO_UINTMAX_T])\n #\n+# Define NO_STRTOULL if you don't have strtoull in the C library.\n+GIT_CHECK_FUNC(strtoull,\n+[NO_STRTOULL=],\n+[NO_STRTOULL=YesPlease])\n+GIT_CONF_SUBST([NO_STRTOULL])\n+#\n # Define NO_STRTOUMAX if you don't have strtoumax in the C library.\n GIT_CHECK_FUNC(strtoumax,\n [NO_STRTOUMAX=],\n-- \n2.21.3\n\n"},{"id":"398060","messageId":"20200518100356.29292-1-dtucker@dtucker.net","threadId":"53494","inReplyTo":null,"subject":"[PATCH 1/7] Redirect grep's stderr top null too.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T10:03:50Z","receivedAt":"2020-05-18T10:04:19Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"Prevents pollution of configure output on platforms that don't have\ngrep -a.\n\nSigned-off-by: Darren Tucker <dtucker@dtucker.net>\n---\n configure.ac | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 66aedb9288..4effc82b76 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -526,7 +526,7 @@ if test -n \"$ASCIIDOC\"; then\n \tesac\n fi\n \n-if grep -a ascii configure.ac >/dev/null; then\n+if grep -a ascii configure.ac >/dev/null 2>&1; then\n   AC_MSG_RESULT([Using 'grep -a' for sane_grep])\n   SANE_TEXT_GREP=-a\n else\n-- \n2.21.3\n\n"},{"id":"398061","messageId":"20200518100356.29292-7-dtucker@dtucker.net","threadId":"53494","inReplyTo":"20200518100356.29292-1-dtucker@dtucker.net","subject":"[PATCH 7/7] Define SCNuMAX if not already defined.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T10:03:56Z","receivedAt":"2020-05-18T10:04:21Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"Signed-off-by: Darren Tucker <dtucker@dtucker.net>\n---\n git-compat-util.h | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex aa221eba1b..2bc468fbd0 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -342,6 +342,10 @@ typedef uintmax_t timestamp_t;\n #define TIME_MAX UINTMAX_MAX\n #define TIME_MIN 0\n \n+#if !defined(SCNuMAX) && defined(SCNu64)\n+#define SCNuMAX SCNu64\n+#endif\n+\n #ifndef PATH_SEP\n #define PATH_SEP ':'\n #endif\n-- \n2.21.3\n\n"},{"id":"398062","messageId":"87a725r16n.fsf@igel.home","threadId":"53494","inReplyTo":"20200518100356.29292-5-dtucker@dtucker.net","subject":"Re: [PATCH 5/7] Define LLONG_MAX/MIN etc if not already defined.","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2020-05-18T10:24:00Z","receivedAt":"2020-05-18T10:24:26Z","isPatch":true,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Mai 18 2020, Darren Tucker wrote:\n\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index 8ba576e81e..aa221eba1b 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -127,6 +127,22 @@\n>  /* Approximation of the length of the decimal representation of this type. */\n>  #define decimal_length(x)\t((int)(sizeof(x) * 2.56 + 0.5) + 1)\n>  \n> +#ifndef SIZE_MAX\n> +#define SIZE_MAX ((size_t)maximum_signed_value_of_type(size_t))\n\nsize_t is an unsigned type.\n\n> +#endif\n> +\n> +#ifndef LLONG_MIN\n> +#define LLONG_MIN ((long long)minimum_signed_value_of_type(long long))\n> +#endif\n> +\n> +#ifndef LLONG_MAX\n> +#define LLONG_MAX ((long long)maximum_signed_value_of_type(long long))\n> +#endif\n> +\n> +#ifndef ULLONG_MAX\n> +#define ULLONG_MAX ((unsigned long long)maximum_unsigned_value_of_type(unsigned long long))\n> +#endif\n\nThese definitions won't work in the preprocessor.  The are no current\nuses of these macros in preprocessor directives, but that needs to be\nkept in mind.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1\n\"And now for something completely different.\"\n"},{"id":"398068","messageId":"20200518141311.GC1980@danh.dev","threadId":"53494","inReplyTo":"20200518100356.29292-1-dtucker@dtucker.net","subject":"Re: [PATCH 1/7] Redirect grep's stderr top null too.","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-05-18T14:13:11Z","receivedAt":"2020-05-18T14:13:16Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Hi Darren,\n\nOn 2020-05-18 20:03:50+1000, Darren Tucker <dtucker@dtucker.net> wrote:\n> Prevents pollution of configure output on platforms that don't have\n> grep -a.\n\nFrom your other's patch, I think you're in HP-UX,\nwould you mind also run the test.\n\nSince t5703 also uses \"grep -a\"\n\n> \n> Signed-off-by: Darren Tucker <dtucker@dtucker.net>\n> ---\n>  configure.ac | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/configure.ac b/configure.ac\n> index 66aedb9288..4effc82b76 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -526,7 +526,7 @@ if test -n \"$ASCIIDOC\"; then\n>  \tesac\n>  fi\n>  \n> -if grep -a ascii configure.ac >/dev/null; then\n> +if grep -a ascii configure.ac >/dev/null 2>&1; then\n>    AC_MSG_RESULT([Using 'grep -a' for sane_grep])\n>    SANE_TEXT_GREP=-a\n>  else\n> -- \n> 2.21.3\n> \n\n-- \nDanh\n"},{"id":"398069","messageId":"CALDDTe13_utn7E+QF1AgndX_6nPph=Gr1hesLwfV8e9LwgUPOQ@mail.gmail.com","threadId":"53494","inReplyTo":"20200518141311.GC1980@danh.dev","subject":"Re: [PATCH 1/7] Redirect grep's stderr top null too.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T14:29:47Z","receivedAt":"2020-05-18T14:30:01Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"On Tue, 19 May 2020 at 00:13, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n>\n> Hi Darren,\n>\n> On 2020-05-18 20:03:50+1000, Darren Tucker <dtucker@dtucker.net> wrote:\n> > Prevents pollution of configure output on platforms that don't have\n> > grep -a.\n>\n> From your other's patch, I think you're in HP-UX,\n\nYes (it's not my usual platform but I had occasion to test something\non it so revived an old system).\n\n> would you mind also run the test.\n>\n> Since t5703 also uses \"grep -a\"\n\nIt fails with:\n$ ./t5703-upload-pack-ref-in-want.sh\nsed: There are too many commands for the s/\\n// function.\nok 1 - setup repository\nsed: There are too many commands for the s/\\n// function.\nnot ok 2 - config controls ref-in-want advertisement\n#\n#               test-tool serve-v2 --advertise-capabilities >out &&\n#               ! grep -a ref-in-want out &&\n#\n#               git config uploadpack.allowRefInWant false &&\n#               test-tool serve-v2 --advertise-capabilities >out &&\n#               ! grep -a ref-in-want out &&\n#\n#               git config uploadpack.allowRefInWant true &&\n#               test-tool serve-v2 --advertise-capabilities >out &&\n#               grep -a ref-in-want out\n#\nsed: There are too many commands for the s/\\n// function.\nok 3 - invalid want-ref line\nsed: There are too many commands for the s/\\n// function.\nok 4 - basic want-ref\nsed: There are too many commands for the s/\\n// function.\nok 5 - multiple want-ref lines\nsed: There are too many commands for the s/\\n// function.\nok 6 - mix want and want-ref\nsed: There are too many commands for the s/\\n// function.\nok 7 - want-ref with ref we already have commit for\nsed: There are too many commands for the s/\\n// function.\nFATAL: Unexpected exit with code 0\n\nIf I use gnu sed and native grep, only #2 fails as above.  If I use\ngnu grep and gnu sed it passes with a warning from (gnu) printf:\n$ ./t5703-upload-pack-ref-in-want.sh\nprintf: \\3: invalid escape\nok 1 - setup repository\nok 2 - config controls ref-in-want advertisement\nok 3 - invalid want-ref line\nok 4 - basic want-ref\nok 5 - multiple want-ref lines\nok 6 - mix want and want-ref\nok 7 - want-ref with ref we already have commit for\nok 8 - setup repos for fetching with ref-in-want tests\nok 9 - fetching with exact OID\nok 10 - fetching multiple refs\nok 11 - fetching ref and exact OID\nok 12 - fetching with wildcard that does not match any refs\nok 13 - fetching with wildcard that matches multiple refs\n# passed all 13 test(s)\n# SKIP skipping test, git built without http support\n1..13\n\nMaybe you want AC_PROG_GREP?  That picks the gnu grep in /usr/local,\nbut plumbing it in is more involved.\n\n-- \nDarren Tucker (dtucker at dtucker.net)\nGPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)\n    Good judgement comes with experience. Unfortunately, the experience\nusually comes from bad judgement.\n"},{"id":"398071","messageId":"CALDDTe0ZDQgZnMYHAdcOJnU_ObdA6RmnnhvNwsfmP0RdU_+eTw@mail.gmail.com","threadId":"53494","inReplyTo":"87a725r16n.fsf@igel.home","subject":"Re: [PATCH 5/7] Define LLONG_MAX/MIN etc if not already defined.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T14:41:24Z","receivedAt":"2020-05-18T14:41:37Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"On Mon, 18 May 2020 at 20:24, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> On Mai 18 2020, Darren Tucker wrote:\n[...]\n> > +#define SIZE_MAX ((size_t)maximum_signed_value_of_type(size_t))\n>\n> size_t is an unsigned type.\n\nindeed; missed that in my cut and pasting.\n\n[...]\n> These definitions won't work in the preprocessor.  The are no current\n> uses of these macros in preprocessor directives, but that needs to be\n> kept in mind.\n\nI originally had these defined to LONG_LONG_MAX and ULONG_LONG_MAX\nwhich it (HP-UX 11.11) has.  It's also got SSIZE_MAX but not SIZE_MAX,\nso I originally had\n\n#if !defined(SIZE_MAX) && defined(SSIZE_MAX) && (SSIZE_MAX == LONG_MAX)\n# define SIZE_MAX ULONG_MAX\n#endif\n\nwhich would work in macros, but I changed it at the last minute to use\nthose other macros since it seemed more likely to work on any other\nsystems that had this problem.\n\n-- \nDarren Tucker (dtucker at dtucker.net)\nGPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)\n    Good judgement comes with experience. Unfortunately, the experience\nusually comes from bad judgement.\n"},{"id":"398076","messageId":"20200518153025.GD1980@danh.dev","threadId":"53494","inReplyTo":"CALDDTe13_utn7E+QF1AgndX_6nPph=Gr1hesLwfV8e9LwgUPOQ@mail.gmail.com","subject":"Re: [PATCH 1/7] Redirect grep's stderr top null too.","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-05-18T15:30:25Z","receivedAt":"2020-05-18T15:30:29Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-05-19 00:29:47+1000, Darren Tucker <dtucker@dtucker.net> wrote:\n> On Tue, 19 May 2020 at 00:13, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n> >\n> > Hi Darren,\n> >\n> > On 2020-05-18 20:03:50+1000, Darren Tucker <dtucker@dtucker.net> wrote:\n> > > Prevents pollution of configure output on platforms that don't have\n> > > grep -a.\n> >\n> > From your other's patch, I think you're in HP-UX,\n> \n> Yes (it's not my usual platform but I had occasion to test something\n> on it so revived an old system).\n> \n> > would you mind also run the test.\n> >\n> > Since t5703 also uses \"grep -a\"\n> \n> It fails with:\n> $ ./t5703-upload-pack-ref-in-want.sh\n> sed: There are too many commands for the s/\\n// function.\n\nI think this was introduced at 878f988350 (t/test-lib: teach\n--chain-lint to detect broken &&-chains in subshells, 2018-07-11)\n\nThe chainlint.sed is too complicated for a mortal like me to\nunderstand, I added Eric to Cc.\n\n> ok 1 - setup repository\n> sed: There are too many commands for the s/\\n// function.\n> not ok 2 - config controls ref-in-want advertisement\n> #\n> #               test-tool serve-v2 --advertise-capabilities >out &&\n> #               ! grep -a ref-in-want out &&\n> #\n> #               git config uploadpack.allowRefInWant false &&\n> #               test-tool serve-v2 --advertise-capabilities >out &&\n> #               ! grep -a ref-in-want out &&\n> #\n> #               git config uploadpack.allowRefInWant true &&\n> #               test-tool serve-v2 --advertise-capabilities >out &&\n> #               grep -a ref-in-want out\n\nI'm thinking about:\n-----------8<------------\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex a34460f7d8..92ad5eeec0 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -49,15 +49,18 @@ test_expect_success 'setup repository' '\n \n test_expect_success 'config controls ref-in-want advertisement' '\n \ttest-tool serve-v2 --advertise-capabilities >out &&\n-\t! grep -a ref-in-want out &&\n+\tperl -ne \"/ref-in-want/ and print\" out >out.filter &&\n+\ttest_must_be_empty out.filter &&\n \n \tgit config uploadpack.allowRefInWant false &&\n \ttest-tool serve-v2 --advertise-capabilities >out &&\n-\t! grep -a ref-in-want out &&\n+\tperl -ne \"/ref-in-want/ and print\" out >out.filter &&\n+\ttest_must_be_empty out.filter &&\n \n \tgit config uploadpack.allowRefInWant true &&\n \ttest-tool serve-v2 --advertise-capabilities >out &&\n-\tgrep -a ref-in-want out\n+\tperl -ne \"/ref-in-want/ and print\" out >out.filter &&\n+\ttest_file_not_empty out.filter\n '\n \n test_expect_success 'invalid want-ref line' '\n------------------->8-----------\n\n> #\n> sed: There are too many commands for the s/\\n// function.\n> ok 3 - invalid want-ref line\n> sed: There are too many commands for the s/\\n// function.\n> ok 4 - basic want-ref\n> sed: There are too many commands for the s/\\n// function.\n> ok 5 - multiple want-ref lines\n> sed: There are too many commands for the s/\\n// function.\n> ok 6 - mix want and want-ref\n> sed: There are too many commands for the s/\\n// function.\n> ok 7 - want-ref with ref we already have commit for\n> sed: There are too many commands for the s/\\n// function.\n> FATAL: Unexpected exit with code 0\n> \n> If I use gnu sed and native grep, only #2 fails as above.  If I use\n> gnu grep and gnu sed it passes with a warning from (gnu) printf:\n> $ ./t5703-upload-pack-ref-in-want.sh\n> printf: \\3: invalid escape\n\nLook like HP-UX's printf doesn't understand octal escape.\nThis may be a problem, since we've a patch to fix git-bisect's replace\nfor Windows, which is using \"printf \\015\"\nCc-ing Junio for checking.\n\n\n-- \nDanh\n"},{"id":"398105","messageId":"xmqqo8ql40z7.fsf@gitster.c.googlers.com","threadId":"53494","inReplyTo":"20200518100356.29292-6-dtucker@dtucker.net","subject":"Re: [PATCH 6/7] Check if strtoumax is a macro (eg HP-UX 11.11).","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-05-18T17:17:00Z","receivedAt":"2020-05-18T17:17:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Darren Tucker <dtucker@dtucker.net> writes:\n\n> Signed-off-by: Darren Tucker <dtucker@dtucker.net>\n> ---\n>  configure.ac | 10 ++++++++--\n>  1 file changed, 8 insertions(+), 2 deletions(-)\n>\n> diff --git a/configure.ac b/configure.ac\n> index 14e09b04b6..87a39c5ae0 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -1164,10 +1164,16 @@ GIT_CHECK_FUNC(strtoull,\n>  [NO_STRTOULL=YesPlease])\n>  GIT_CONF_SUBST([NO_STRTOULL])\n>  #\n> -# Define NO_STRTOUMAX if you don't have strtoumax in the C library.\n> +# Define NO_STRTOUMAX if you don't have strtoumax in the C library\n> +# or as a macro in inttypes.h.\n>  GIT_CHECK_FUNC(strtoumax,\n>  [NO_STRTOUMAX=],\n> -[NO_STRTOUMAX=YesPlease])\n> +[\n> +\tAC_CHECK_DECL(strtoumax,\n> +\t[NO_STRTOUMAX=],\n> +\t[NO_STRTOUMAX=YesPlease],\n> +\t[#include <inttypes.h>])\n> +])\n\nIt is kind of surprising that we got away with GIT_CHECK_FUNC() that\nmisses an implementation by macro without having problems with other\nsymbols.  \n\nI don't mind taking this patch as-is, but it makes me wonder if we\nneed to devise a more systematic approach to the issue than \"oh, I\nfound GIT_CHECK_FUNC() does not work for X on system Y, so let's add\nan AC_CHECK_DECL() for it, too\" approach, which this patch is its\nfirst step.\n\nThanks.\n\n"},{"id":"398118","messageId":"xmqq367x3y20.fsf@gitster.c.googlers.com","threadId":"53494","inReplyTo":"20200518100356.29292-1-dtucker@dtucker.net","subject":"Re: [PATCH 1/7] Redirect grep's stderr top null too.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-05-18T18:20:07Z","receivedAt":"2020-05-18T18:20:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Darren Tucker <dtucker@dtucker.net> writes:\n\n> Subject: Re: [PATCH 1/7] Redirect grep's stderr top null too.\n\nOur patch title typically looks like\n\n\tarea: title without initial Capitalization and full stop\n\nPerhaps\n\n\tSubject: autoconf: redirect grep's stderr to null\n\n> Prevents pollution of configure output on platforms that don't have\n> grep -a.\n\nOur log message typically describes the state without this patch in\nthe current tense to highlight the problem being solved, and then\norders the person who is updating the system to \"make the codebase\nlike so\", e.g.\n\n\tWhen the tested platform's 'grep' does not support the '-a'\n\toption, an error message would be given to its standard\n\terror stream, polluting the output.\n\n\tRedirect the error message to /dev/null, in addition to the\n\tstandard output, to squelch it.\n\nor something along that style.\n\nThanks.\n\n>\n> Signed-off-by: Darren Tucker <dtucker@dtucker.net>\n> ---\n>  configure.ac | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/configure.ac b/configure.ac\n> index 66aedb9288..4effc82b76 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -526,7 +526,7 @@ if test -n \"$ASCIIDOC\"; then\n>  \tesac\n>  fi\n>  \n> -if grep -a ascii configure.ac >/dev/null; then\n> +if grep -a ascii configure.ac >/dev/null 2>&1; then\n>    AC_MSG_RESULT([Using 'grep -a' for sane_grep])\n>    SANE_TEXT_GREP=-a\n>  else\n"},{"id":"398121","messageId":"xmqqy2pp2j2l.fsf@gitster.c.googlers.com","threadId":"53494","inReplyTo":"20200518100356.29292-4-dtucker@dtucker.net","subject":"Re: [PATCH 4/7] Use strtoumax instead of strtoull.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-05-18T18:29:06Z","receivedAt":"2020-05-18T18:29:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Darren Tucker <dtucker@dtucker.net> writes:\n\n> strtoumax is in the compat library so this works on platforms that don't\n> have a native strtoull.\n\nThe above description (even though is a good one) alone would leave\nthe reader wondering if this patch now has removed the last use of\nstrtoull(), removing the need to have NO_STRTOULL in the Makefile\nand configure.ac, and also wonder why the patch does not touch\nMakefile etc.  Something like\n\n\tWe still use strtoull() as a part of the compatibility\n\timplementation of strtoumax(), so we cannot remove the\n\tsupport to detect/configure the use of the function in the\n\tMakefile and autoconf, though.\n\nmay deserve to be made into the second paragraph that follows the\nabove description.\n\nShouldn't the type of some variables in the codepath also be changed\nto make sure we receive the return value from the function in a\nvariable that is large enough?\n\nThanks.\n\n> Signed-off-by: Darren Tucker <dtucker@dtucker.net>\n> ---\n>  t/helper/test-progress.c | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/t/helper/test-progress.c b/t/helper/test-progress.c\n> index 5d05cbe789..3e9eb2abe3 100644\n> --- a/t/helper/test-progress.c\n> +++ b/t/helper/test-progress.c\n> @@ -47,7 +47,7 @@ int cmd__progress(int argc, const char **argv)\n>  \t\tchar *end;\n>  \n>  \t\tif (skip_prefix(line.buf, \"progress \", (const char **) &end)) {\n> -\t\t\tuint64_t item_count = strtoull(end, &end, 10);\n> +\t\t\tuint64_t item_count = strtoumax(end, &end, 10);\n>  \t\t\tif (*end != '\\0')\n>  \t\t\t\tdie(\"invalid input: '%s'\\n\", line.buf);\n>  \t\t\tdisplay_progress(progress, item_count);\n> @@ -55,10 +55,10 @@ int cmd__progress(int argc, const char **argv)\n>  \t\t\t\t       (const char **) &end)) {\n>  \t\t\tuint64_t byte_count, test_ms;\n>  \n> -\t\t\tbyte_count = strtoull(end, &end, 10);\n> +\t\t\tbyte_count = strtoumax(end, &end, 10);\n>  \t\t\tif (*end != ' ')\n>  \t\t\t\tdie(\"invalid input: '%s'\\n\", line.buf);\n> -\t\t\ttest_ms = strtoull(end + 1, &end, 10);\n> +\t\t\ttest_ms = strtoumax(end + 1, &end, 10);\n>  \t\t\tif (*end != '\\0')\n>  \t\t\t\tdie(\"invalid input: '%s'\\n\", line.buf);\n>  \t\t\tprogress_test_ns = test_ms * 1000 * 1000;\n"},{"id":"398163","messageId":"CALDDTe0BvyXYz39n0EqGnJgdfHMziwW7V5xQO_H=+OKm20jfFA@mail.gmail.com","threadId":"53494","inReplyTo":"20200518153025.GD1980@danh.dev","subject":"Re: [PATCH 1/7] Redirect grep's stderr top null too.","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-18T23:22:01Z","receivedAt":"2020-05-18T23:22:15Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"On Tue, 19 May 2020 at 01:30, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n[...]\n> > printf: \\3: invalid escape\n>\n> Look like HP-UX's printf doesn't understand octal escape.\n\nThe HP-UX one is actually OK with that.  The error is from an old gnu\ncoreutils (2.0), and it's complaining because there no leading zero,\nwhich POSIX says octal escapes have:\nhttps://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html\n\n\"\"\"\nThe following <backslash>-escape sequences shall be supported:\n[...]\n\"\\0ddd\", where ddd is a zero, one, two, or three-digit octal number\nthat shall be converted to a byte with the numeric value specified by\nthe octal number\n\"\"\"\n\n$ /usr/local/bin/printf '\\03' | od -x\n0000000 0300\n0000001\n$ /usr/local/bin/printf '\\3' | od -x\n/usr/local/bin/printf: \\3: invalid escape\n0000000\n\n-- \nDarren Tucker (dtucker at dtucker.net)\nGPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)\n    Good judgement comes with experience. Unfortunately, the experience\nusually comes from bad judgement.\n"},{"id":"398171","messageId":"20200519005645.GD1999@danh.dev","threadId":"53494","inReplyTo":"CALDDTe0BvyXYz39n0EqGnJgdfHMziwW7V5xQO_H=+OKm20jfFA@mail.gmail.com","subject":"[PATCH] t5703: replace \"grep -a\" usage by perl","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-05-19T00:56:45Z","receivedAt":"2020-05-19T00:56:49Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-05-19 09:22:01+1000, Darren Tucker <dtucker@dtucker.net> wrote:\n> On Tue, 19 May 2020 at 01:30, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n> [...]\n> > > printf: \\3: invalid escape\n> >\n> > Look like HP-UX's printf doesn't understand octal escape.\n> \n> The HP-UX one is actually OK with that.  The error is from an old gnu\n> coreutils (2.0), and it's complaining because there no leading zero,\n> which POSIX says octal escapes have:\n> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html\n\nI think it's better to use HP-UX native tools for the test.\nCan you check with this patch applied on top of your tree.\n-------------8<------------\nFrom: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=\n <congdanhqx@gmail.com>\nDate: Tue, 19 May 2020 07:50:46 +0700\nSubject: [PATCH] t5703: replace \"grep -a\" usage by perl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n\nOn some platforms likes HP-UX, grep(1) doesn't understand \"-a\".\n\nLet's switch to perl.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n\nNotes:\n    We can also copy-and-paste code from t4019,\n    to avoid introduce perl to this test.\n\n t/t5703-upload-pack-ref-in-want.sh | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\nindex a34460f7d8..92ad5eeec0 100755\n--- a/t/t5703-upload-pack-ref-in-want.sh\n+++ b/t/t5703-upload-pack-ref-in-want.sh\n@@ -49,15 +49,18 @@ test_expect_success 'setup repository' '\n \n test_expect_success 'config controls ref-in-want advertisement' '\n \ttest-tool serve-v2 --advertise-capabilities >out &&\n-\t! grep -a ref-in-want out &&\n+\tperl -ne \"/ref-in-want/ and print\" out >out.filter &&\n+\ttest_must_be_empty out.filter &&\n \n \tgit config uploadpack.allowRefInWant false &&\n \ttest-tool serve-v2 --advertise-capabilities >out &&\n-\t! grep -a ref-in-want out &&\n+\tperl -ne \"/ref-in-want/ and print\" out >out.filter &&\n+\ttest_must_be_empty out.filter &&\n \n \tgit config uploadpack.allowRefInWant true &&\n \ttest-tool serve-v2 --advertise-capabilities >out &&\n-\tgrep -a ref-in-want out\n+\tperl -ne \"/ref-in-want/ and print\" out >out.filter &&\n+\ttest_file_not_empty out.filter\n '\n \n test_expect_success 'invalid want-ref line' '\n-- \n2.27.0.rc0.4.gf5e7b24084\n\n\n-- \nDanh\n"},{"id":"398173","messageId":"CALDDTe1k7Fsb9p+4TEd3GSG_bOucrxSKmENsjACwga8L7LvLXg@mail.gmail.com","threadId":"53494","inReplyTo":"20200519005645.GD1999@danh.dev","subject":"Re: [PATCH] t5703: replace \"grep -a\" usage by perl","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-19T02:22:57Z","receivedAt":"2020-05-19T02:23:12Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"On Tue, 19 May 2020 at 10:56, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n> On 2020-05-19 09:22:01+1000, Darren Tucker <dtucker@dtucker.net> wrote:\n> > On Tue, 19 May 2020 at 01:30, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:\n> > [...]\n> > > > printf: \\3: invalid escape\n> > >\n> > > Look like HP-UX's printf doesn't understand octal escape.\n> >\n> > The HP-UX one is actually OK with that.  The error is from an old gnu\n> > coreutils (2.0), and it's complaining because there no leading zero,\n> > which POSIX says octal escapes have:\n> > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html\n\nI've replaced the printf in question.  You could add leading zeroes in\ncase anything else strictly conforms to POSIX but it looks like\nthere's quite a lot of them.\n\n> I think it's better to use HP-UX native tools for the test.\n> Can you check with this patch applied on top of your tree.\n[...]\n> On some platforms likes HP-UX, grep(1) doesn't understand \"-a\".\n\nnit: \"like HP-UX\"\n\nYep that works:\n\n$ PATH=/usr/local/bin:$PATH ./t5703-upload-pack-ref-in-want.sh\nok 1 - setup repository\nok 2 - config controls ref-in-want advertisement\nok 3 - invalid want-ref line\nok 4 - basic want-ref\nok 5 - multiple want-ref lines\nok 6 - mix want and want-ref\nok 7 - want-ref with ref we already have commit for\nok 8 - setup repos for fetching with ref-in-want tests\nok 9 - fetching with exact OID\nok 10 - fetching multiple refs\nok 11 - fetching ref and exact OID\nok 12 - fetching with wildcard that does not match any refs\nok 13 - fetching with wildcard that matches multiple refs\n# passed all 13 test(s)\n# SKIP skipping test, git built without http support\n1..13\n\nThanks.\n\n-- \nDarren Tucker (dtucker at dtucker.net)\nGPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)\n    Good judgement comes with experience. Unfortunately, the experience\nusually comes from bad judgement.\n"},{"id":"398180","messageId":"CAP8UFD2vYwnwgNWX3tg5w-7kCg3kzNscVbnk0DJfSD4UV-D0hg@mail.gmail.com","threadId":"53494","inReplyTo":"20200519005645.GD1999@danh.dev","subject":"Re: [PATCH] t5703: replace \"grep -a\" usage by perl","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-05-19T07:13:19Z","receivedAt":"2020-05-19T07:13:33Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tue, May 19, 2020 at 3:00 AM Đoàn Trần Công Danh\n<congdanhqx@gmail.com> wrote:\n\n> On some platforms likes HP-UX, grep(1) doesn't understand \"-a\".\n>\n> Let's switch to perl.\n\nThere are some other platforms where Perl is difficult to install.\nThat's why we have the 'NO_PERL' Makefile knob, and the 'PERL' test\nprereq which is used in some test scripts like t0021-conversion.sh,\nt2016-checkout-patch.sh, t2071-restore-patch.sh, ...\n\n>     We can also copy-and-paste code from t4019,\n>     to avoid introduce perl to this test.\n\nThis might be a good idea.\n\n>  t/t5703-upload-pack-ref-in-want.sh | 9 ++++++---\n>  1 file changed, 6 insertions(+), 3 deletions(-)\n>\n> diff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\n> index a34460f7d8..92ad5eeec0 100755\n> --- a/t/t5703-upload-pack-ref-in-want.sh\n> +++ b/t/t5703-upload-pack-ref-in-want.sh\n> @@ -49,15 +49,18 @@ test_expect_success 'setup repository' '\n>\n>  test_expect_success 'config controls ref-in-want advertisement' '\n\nAt least you should add the PERL prereq to the test with something like:\n\ntest_expect_success PERL 'config controls ref-in-want advertisement' '\n\n>         test-tool serve-v2 --advertise-capabilities >out &&\n> -       ! grep -a ref-in-want out &&\n> +       perl -ne \"/ref-in-want/ and print\" out >out.filter &&\n> +       test_must_be_empty out.filter &&\n\nThanks,\nChristian.\n"},{"id":"398197","messageId":"20200519113920.GA2051@danh.dev","threadId":"53494","inReplyTo":"CAP8UFD2vYwnwgNWX3tg5w-7kCg3kzNscVbnk0DJfSD4UV-D0hg@mail.gmail.com","subject":"Re: [PATCH] t5703: replace \"grep -a\" usage by perl","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-05-19T11:39:20Z","receivedAt":"2020-05-19T11:39:25Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-05-19 09:13:19+0200, Christian Couder <christian.couder@gmail.com> wrote:\n> On Tue, May 19, 2020 at 3:00 AM Đoàn Trần Công Danh\n> <congdanhqx@gmail.com> wrote:\n\n> \n> >     We can also copy-and-paste code from t4019,\n> >     to avoid introduce perl to this test.\n> \n> This might be a good idea.\n\nProbably we need 2 patches, one to libify the current usage in t4019,\none to replace \"grep -a\" usage in t5703.\n\nConsider this is floating for a long time, I think we can hold this\nfor the time being, until after 2.27.0 released.\n\n> >  t/t5703-upload-pack-ref-in-want.sh | 9 ++++++---\n> >  1 file changed, 6 insertions(+), 3 deletions(-)\n> >\n> > diff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh\n> > index a34460f7d8..92ad5eeec0 100755\n> > --- a/t/t5703-upload-pack-ref-in-want.sh\n> > +++ b/t/t5703-upload-pack-ref-in-want.sh\n> > @@ -49,15 +49,18 @@ test_expect_success 'setup repository' '\n> >\n> >  test_expect_success 'config controls ref-in-want advertisement' '\n> \n> At least you should add the PERL prereq to the test with something like:\n> \n> test_expect_success PERL 'config controls ref-in-want advertisement' '\n\nWell, that's is not t/README says:\n\n - PERL\n\n   Git wasn't compiled with NO_PERL=YesPlease.\n\n   Even without the PERL prerequisite, tests can assume there is a\n   usable perl interpreter at $PERL_PATH, though it need not be\n   particularly modern.\n\nAnd, there're a lot of tests using perl without PERL prereq:\n\n\t$ git grep -l '[        ]perl ' 't/t????-*.sh' | wc -l\n\t55\n\t$ git grep -l PERL 't/t????-*.sh' | wc -l\n\t35\n\n\n-- \nDanh\n"},{"id":"398201","messageId":"CAP8UFD00AAG7hmLEq_LzhcmQ=iHMV27W9+75g9y9JMQSt15j6Q@mail.gmail.com","threadId":"53494","inReplyTo":"20200519113920.GA2051@danh.dev","subject":"Re: [PATCH] t5703: replace \"grep -a\" usage by perl","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-05-19T14:13:38Z","receivedAt":"2020-05-19T14:13:54Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Tue, May 19, 2020 at 1:39 PM Đoàn Trần Công Danh\n<congdanhqx@gmail.com> wrote:\n>\n> On 2020-05-19 09:13:19+0200, Christian Couder <christian.couder@gmail.com> wrote:\n> > On Tue, May 19, 2020 at 3:00 AM Đoàn Trần Công Danh\n> > <congdanhqx@gmail.com> wrote:\n\n> > >  test_expect_success 'config controls ref-in-want advertisement' '\n> >\n> > At least you should add the PERL prereq to the test with something like:\n> >\n> > test_expect_success PERL 'config controls ref-in-want advertisement' '\n>\n> Well, that's is not t/README says:\n>\n>  - PERL\n>\n>    Git wasn't compiled with NO_PERL=YesPlease.\n>\n>    Even without the PERL prerequisite, tests can assume there is a\n>    usable perl interpreter at $PERL_PATH, though it need not be\n>    particularly modern.\n>\n> And, there're a lot of tests using perl without PERL prereq:\n>\n>         $ git grep -l '[        ]perl ' 't/t????-*.sh' | wc -l\n>         55\n>         $ git grep -l PERL 't/t????-*.sh' | wc -l\n>         35\n\nOk, sorry about the noise then.\n"},{"id":"398203","messageId":"CAPig+cTCbBE4Xj7LGJDqz4pcRsR-ZAF-ekcMnZ_cDuzgmEnxcw@mail.gmail.com","threadId":"53494","inReplyTo":"20200518153025.GD1980@danh.dev","subject":"Re: [PATCH 1/7] Redirect grep's stderr top null too.","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-05-19T16:09:27Z","receivedAt":"2020-05-19T16:09:41Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 18, 2020 at 11:30 AM Đoàn Trần Công Danh\n<congdanhqx@gmail.com> wrote:\n> On 2020-05-19 00:29:47+1000, Darren Tucker <dtucker@dtucker.net> wrote:\n> > $ ./t5703-upload-pack-ref-in-want.sh\n> > sed: There are too many commands for the s/\\n// function.\n>\n> I think this was introduced at 878f988350 (t/test-lib: teach\n> --chain-lint to detect broken &&-chains in subshells, 2018-07-11)\n>\n> The chainlint.sed is too complicated for a mortal like me to\n> understand, I added Eric to Cc.\n\nThat's a rather weird error message; seems like that 'sed' is somewhat broken.\n\nBack when Ævar was trying to get chain-lint to work on some really old\nand broken platforms, it was ultimately decided (if I recall\ncorrectly) that it wasn't worth the effort, and that chain-lint should\nsimply be disabled via GIT_TEST_CHAIN_LINT=0 or --no-chain-lint on\nthose platforms.\n\nAfter all, chain-lint exists only to ferret out a specific problem in\n_newly-written_ tests (it's testing the tests), not to ferret out\nproblems in Git functionality (that's what the test suite itself is\nfor). So it's not a great loss to disable chain-lint on an old or\nbroken platform on which it is unlikely someone will be developing\n_new_ tests. (And, even if someone does write a test on such a\nplatform, &&-chain breakage will be discovered soon enough once the\npatch is posted to the mailing list and someone runs it on a\nnon-broken platform.)\n"},{"id":"398230","messageId":"CALDDTe3CBUxEC7E+xc3RhJP45N3v8QXNqt3oq98308x-PJ9r_w@mail.gmail.com","threadId":"53494","inReplyTo":"xmqqo8ql40z7.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 6/7] Check if strtoumax is a macro (eg HP-UX 11.11).","fromName":"Darren Tucker","fromEmail":"dtucker@dtucker.net","sentAt":"2020-05-20T01:49:09Z","receivedAt":"2020-05-20T01:49:23Z","isPatch":true,"sender":{"key":"dtucker@dtucker.net","avatar":null},"body":"On Tue, 19 May 2020 at 03:17, Junio C Hamano <gitster@pobox.com> wrote:\n[...]\n> It is kind of surprising that we got away with GIT_CHECK_FUNC() that\n> misses an implementation by macro without having problems with other\n> symbols.\n\nI suspect that in most cases you'll go to the fallback and be fine.\nIn this case, it falls back to strtoull which it doesn't have. (Adding\nthe strtoull test in patch 3/7 makes it fall back to strtoul which it\ndoes have).\n\nThe other annoyance is that it produces a macro redefinition warning\non each file.  An alternative solution to that would be to undef\nstrtoumax in git-compat-util.h before redefining it.\n\n> I don't mind taking this patch as-is, but it makes me wonder if we\n> need to devise a more systematic approach to the issue than \"oh, I\n> found GIT_CHECK_FUNC() does not work for X on system Y, so let's add\n> an AC_CHECK_DECL() for it, too\" approach, which this patch is its\n> first step.\n\nThe caveat with putting it in GIT_CHECK_FUNC() is that you'll need to\ninclude the union of all of the header files that might have all of\nthe things you're looking for instead of the hopefully small set of\nthem that might have the one specific thing you're looking for.  I\nsuspect that would be more hassle than it's worth.\n\n-- \nDarren Tucker (dtucker at dtucker.net)\nGPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)\n    Good judgement comes with experience. Unfortunately, the experience\nusually comes from bad judgement.\n"},{"id":"398233","messageId":"xmqqh7wbxph3.fsf@gitster.c.googlers.com","threadId":"53494","inReplyTo":"CALDDTe3CBUxEC7E+xc3RhJP45N3v8QXNqt3oq98308x-PJ9r_w@mail.gmail.com","subject":"Re: [PATCH 6/7] Check if strtoumax is a macro (eg HP-UX 11.11).","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-05-20T03:19:36Z","receivedAt":"2020-05-20T03:19:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Darren Tucker <dtucker@dtucker.net> writes:\n\n> The caveat with putting it in GIT_CHECK_FUNC() is that you'll need to\n> include the union of all of the header files that might have all of\n> the things you're looking for instead of the hopefully small set of\n> them that might have the one specific thing you're looking for.  I\n> suspect that would be more hassle than it's worth.\n\nOh, what I had in mind was to replace GIT_CHECK_FUNC() with a macro\nthat takes not just function name but also include file.  Not \"the\nunion of all the include files\".\n\n"}]}