{"thread":{"id":"50427","subject":"[PATCH] ci: make sure we build Git parallel","startedAt":"2019-02-07T18:38:34Z","lastAt":"2019-02-08T17:25:47Z","messageCount":11,"participants":["SZEDER Gábor","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"368716","messageId":"20190207183736.9299-1-szeder.dev@gmail.com","threadId":"50427","inReplyTo":null,"subject":"[PATCH] ci: make sure we build Git parallel","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-02-07T18:37:36Z","receivedAt":"2019-02-07T18:38:34Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Commit 2c8921db2b (travis-ci: build with the right compiler,\n2019-01-17) started to use MAKEFLAGS to specify which compiler to use\nto build Git.  A bit later, and in a different topic branch commit\neaa62291ff (ci: inherit --jobs via MAKEFLAGS in run-build-and-tests,\n2019-01-27) started to use MAKEFLAGS as well.  Unfortunately, there is\na semantic conflict between these two commits: both of them set\nMAKEFLAGS, and since the line adding CC from 2c8921db2b comes later in\n'ci/lib.sh', it overwrites the number of parallel jobs added in\neaa62291ff.\n\nConsequently, since both commits have been merged all our CI jobs have\nbeen building Git, building its documentation, and applying semantic\npatches sequentially, making all build jobs a bit slower.  Running\nthe test suite is unaffected, because the number of test jobs comes\nfrom GIT_PROVE_OPTS.\n\nAppend to MAKEFLAGS when setting the compiler to use, to ensure that\nthe number of parallel jobs to use is preserved.\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n---\n ci/lib.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 16f4ecbc67..cee51a4cc4 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -185,4 +185,4 @@ GIT_TEST_GETTEXT_POISON)\n \t;;\n esac\n \n-export MAKEFLAGS=\"CC=${CC:-cc}\"\n+export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n-- \n2.20.1.940.g8404bb2d1a\n\n"},{"id":"368719","messageId":"xmqqbm3npgox.fsf@gitster-ct.c.googlers.com","threadId":"50427","inReplyTo":"20190207183736.9299-1-szeder.dev@gmail.com","subject":"Re: [PATCH] ci: make sure we build Git parallel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-02-07T19:00:14Z","receivedAt":"2019-02-07T19:00:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder.dev@gmail.com> writes:\n\n> Append to MAKEFLAGS when setting the compiler to use, to ensure that\n> the number of parallel jobs to use is preserved.\n>\n> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n> ---\n>  ci/lib.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/ci/lib.sh b/ci/lib.sh\n> index 16f4ecbc67..cee51a4cc4 100755\n> --- a/ci/lib.sh\n> +++ b/ci/lib.sh\n> @@ -185,4 +185,4 @@ GIT_TEST_GETTEXT_POISON)\n>  \t;;\n>  esac\n>  \n> -export MAKEFLAGS=\"CC=${CC:-cc}\"\n> +export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n\nMakes sense.  Thanks.\n"},{"id":"368720","messageId":"xmqq1s4jpgh6.fsf@gitster-ct.c.googlers.com","threadId":"50427","inReplyTo":"xmqqbm3npgox.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] ci: make sure we build Git parallel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-02-07T19:04:53Z","receivedAt":"2019-02-07T19:04:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> SZEDER Gábor <szeder.dev@gmail.com> writes:\n>\n>> Append to MAKEFLAGS when setting the compiler to use, to ensure that\n>> the number of parallel jobs to use is preserved.\n>>\n>> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>\n>> ---\n>>  ci/lib.sh | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/ci/lib.sh b/ci/lib.sh\n>> index 16f4ecbc67..cee51a4cc4 100755\n>> --- a/ci/lib.sh\n>> +++ b/ci/lib.sh\n>> @@ -185,4 +185,4 @@ GIT_TEST_GETTEXT_POISON)\n>>  \t;;\n>>  esac\n>>  \n>> -export MAKEFLAGS=\"CC=${CC:-cc}\"\n>> +export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n>\n> Makes sense.  Thanks.\n\nWouldn't all other hits of \"MAKEFLAGS=\" in ci/lib.sh also want the\nsame treatment, though?  We know that \"if travis to this, otherwise\nif Asure, do that\" is the first block to muck with MAKEFLAGS in the\nscript, but a new assignment before that block can be added in the\nfuture and cause a similar issue unless we do so.\n\nOf course, at some point we do want to say \"we do not want to\ninherit it from the outside environment\", but then such an\nassignment of empty value should be done at the very beginning with\na comment, not with \"this happens to be the first one to set, so\nlet's not append but assign to clear any previous value\", I would\nthink.\n\n"},{"id":"368723","messageId":"xmqqsgwzo0ib.fsf@gitster-ct.c.googlers.com","threadId":"50427","inReplyTo":"xmqq1s4jpgh6.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] ci: make sure we build Git parallel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-02-07T19:35:08Z","receivedAt":"2019-02-07T19:35:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Wouldn't all other hits of \"MAKEFLAGS=\" in ci/lib.sh also want the\n> same treatment, though?  We know that \"if travis to this, otherwise\n> if Asure, do that\" is the first block to muck with MAKEFLAGS in the\n> script, but a new assignment before that block can be added in the\n> future and cause a similar issue unless we do so.\n>\n> Of course, at some point we do want to say \"we do not want to\n> inherit it from the outside environment\", but then such an\n> assignment of empty value should be done at the very beginning with\n> a comment, not with \"this happens to be the first one to set, so\n> let's not append but assign to clear any previous value\", I would\n> think.\n\nThat is, in a patch form on top of yours, something like this.\n\n\n ci/lib.sh | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex cee51a4cc4..288a5b3884 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -74,6 +74,9 @@ check_unignored_build_artifacts ()\n \t}\n }\n \n+# Clear MAKEFLAGS that may come from the outside world.\n+export MAKEFLAGS=\n+\n # Set 'exit on error' for all CI scripts to let the caller know that\n # something went wrong.\n # Set tracing executed commands, primarily setting environment variables\n@@ -101,7 +104,7 @@ then\n \tBREW_INSTALL_PACKAGES=\"git-lfs gettext\"\n \texport GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n \texport GIT_TEST_OPTS=\"--verbose-log -x --immediate\"\n-\texport MAKEFLAGS=\"--jobs=2\"\n+\tMAKEFLAGS=\"$MAKEFLAGS --jobs=2\"\n elif test -n \"$SYSTEM_COLLECTIONURI\" || test -n \"$SYSTEM_TASKDEFINITIONSURI\"\n then\n \tCI_TYPE=azure-pipelines\n@@ -126,7 +129,7 @@ then\n \tBREW_INSTALL_PACKAGES=gcc@8\n \texport GIT_PROVE_OPTS=\"--timer --jobs 10 --state=failed,slow,save\"\n \texport GIT_TEST_OPTS=\"--verbose-log -x --write-junit-xml\"\n-\texport MAKEFLAGS=\"--jobs=10\"\n+\tMAKEFLAGS=\"$MAKEFLAGS --jobs=10\"\n \ttest windows_nt != \"$CI_OS_NAME\" ||\n \tGIT_TEST_OPTS=\"--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS\"\n else\n@@ -185,4 +188,4 @@ GIT_TEST_GETTEXT_POISON)\n \t;;\n esac\n \n-export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n+MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n"},{"id":"368749","messageId":"nycvar.QRO.7.76.6.1902072331060.41@tvgsbejvaqbjf.bet","threadId":"50427","inReplyTo":"xmqqsgwzo0ib.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] ci: make sure we build Git parallel","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-02-07T22:32:49Z","receivedAt":"2019-02-07T22:32:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 7 Feb 2019, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > Wouldn't all other hits of \"MAKEFLAGS=\" in ci/lib.sh also want the\n> > same treatment, though?  We know that \"if travis to this, otherwise\n> > if Asure, do that\" is the first block to muck with MAKEFLAGS in the\n> > script, but a new assignment before that block can be added in the\n> > future and cause a similar issue unless we do so.\n> >\n> > Of course, at some point we do want to say \"we do not want to\n> > inherit it from the outside environment\", but then such an\n> > assignment of empty value should be done at the very beginning with\n> > a comment, not with \"this happens to be the first one to set, so\n> > let's not append but assign to clear any previous value\", I would\n> > think.\n> \n> That is, in a patch form on top of yours, something like this.\n> \n> \n>  ci/lib.sh | 9 ++++++---\n>  1 file changed, 6 insertions(+), 3 deletions(-)\n> \n> diff --git a/ci/lib.sh b/ci/lib.sh\n> index cee51a4cc4..288a5b3884 100755\n> --- a/ci/lib.sh\n> +++ b/ci/lib.sh\n> @@ -74,6 +74,9 @@ check_unignored_build_artifacts ()\n>  \t}\n>  }\n>  \n> +# Clear MAKEFLAGS that may come from the outside world.\n> +export MAKEFLAGS=\n> +\n>  # Set 'exit on error' for all CI scripts to let the caller know that\n>  # something went wrong.\n>  # Set tracing executed commands, primarily setting environment variables\n> @@ -101,7 +104,7 @@ then\n>  \tBREW_INSTALL_PACKAGES=\"git-lfs gettext\"\n>  \texport GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n>  \texport GIT_TEST_OPTS=\"--verbose-log -x --immediate\"\n> -\texport MAKEFLAGS=\"--jobs=2\"\n> +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=2\"\n>  elif test -n \"$SYSTEM_COLLECTIONURI\" || test -n \"$SYSTEM_TASKDEFINITIONSURI\"\n>  then\n>  \tCI_TYPE=azure-pipelines\n> @@ -126,7 +129,7 @@ then\n>  \tBREW_INSTALL_PACKAGES=gcc@8\n>  \texport GIT_PROVE_OPTS=\"--timer --jobs 10 --state=failed,slow,save\"\n>  \texport GIT_TEST_OPTS=\"--verbose-log -x --write-junit-xml\"\n> -\texport MAKEFLAGS=\"--jobs=10\"\n> +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=10\"\n>  \ttest windows_nt != \"$CI_OS_NAME\" ||\n>  \tGIT_TEST_OPTS=\"--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS\"\n>  else\n> @@ -185,4 +188,4 @@ GIT_TEST_GETTEXT_POISON)\n>  \t;;\n>  esac\n>  \n> -export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n> +MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n\nSince this is intended to be run in a CI setting, there is not a whole lot\nof opportunity to set `MAKEFLAGS` outside of the script. And if there is,\nthat might open a rabbit hole when debugging issues that somehow in the\nend turn out to come from a hard-coded `MAKEFLAGS` somewhere in the CI\nsystem.\n\nSo I'd rather clear `MAKEFLAGS` at the beginning (i.e. where you `export\nMAKEFLAGS`, I'd simply append a `=`).\n\nCiao,\nDscho\n"},{"id":"368754","messageId":"xmqqh8dfmawn.fsf@gitster-ct.c.googlers.com","threadId":"50427","inReplyTo":"nycvar.QRO.7.76.6.1902072331060.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH] ci: make sure we build Git parallel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-02-07T23:33:28Z","receivedAt":"2019-02-07T23:33:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>>  \n>> +# Clear MAKEFLAGS that may come from the outside world.\n>> +export MAKEFLAGS=\n>> +\n>>  # Set 'exit on error' for all CI scripts to let the caller know that\n>>  # something went wrong.\n>>  # Set tracing executed commands, primarily setting environment variables\n>> @@ -101,7 +104,7 @@ then\n>>  \tBREW_INSTALL_PACKAGES=\"git-lfs gettext\"\n>>  \texport GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n>>  \texport GIT_TEST_OPTS=\"--verbose-log -x --immediate\"\n>> -\texport MAKEFLAGS=\"--jobs=2\"\n>> +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=2\"\n>>  elif test -n \"$SYSTEM_COLLECTIONURI\" || test -n \"$SYSTEM_TASKDEFINITIONSURI\"\n>>  then\n>>  \tCI_TYPE=azure-pipelines\n>> @@ -126,7 +129,7 @@ then\n>>  \tBREW_INSTALL_PACKAGES=gcc@8\n>>  \texport GIT_PROVE_OPTS=\"--timer --jobs 10 --state=failed,slow,save\"\n>>  \texport GIT_TEST_OPTS=\"--verbose-log -x --write-junit-xml\"\n>> -\texport MAKEFLAGS=\"--jobs=10\"\n>> +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=10\"\n>>  \ttest windows_nt != \"$CI_OS_NAME\" ||\n>>  \tGIT_TEST_OPTS=\"--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS\"\n>>  else\n>> @@ -185,4 +188,4 @@ GIT_TEST_GETTEXT_POISON)\n>>  \t;;\n>>  esac\n>>  \n>> -export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n>> +MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n>\n> Since this is intended to be run in a CI setting, there is not a whole lot\n> of opportunity to set `MAKEFLAGS` outside of the script. And if there is,\n> that might open a rabbit hole when debugging issues that somehow in the\n> end turn out to come from a hard-coded `MAKEFLAGS` somewhere in the CI\n> system.\n>\n> So I'd rather clear `MAKEFLAGS` at the beginning (i.e. where you `export\n> MAKEFLAGS`, I'd simply append a `=`).\n\nI meant to clear it at the beginning, where I \"export MAKEFLAGS=\".\nDid your MUA ate the equal sign at the end, mistaking it with part\nof text/plain; format=flawed or something?\n"},{"id":"368755","messageId":"xmqqd0o3mac5.fsf_-_@gitster-ct.c.googlers.com","threadId":"50427","inReplyTo":"xmqqh8dfmawn.fsf@gitster-ct.c.googlers.com","subject":"[PATCH] ci: clear and mark MAKEFLAGS exported just once","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-02-07T23:45:46Z","receivedAt":"2019-02-07T23:45:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Clearing it once upfront, and turning all the assignment into\nappending, would future-proof the code even more, to prevent\nmistakes the previous one fixed from happening again.\n\nAlso, mark the variable exported just once at the beginning.  There\nis no point in marking it exported repeatedly.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n    >> So I'd rather clear `MAKEFLAGS` at the beginning (i.e. where you `export\n    >> MAKEFLAGS`, I'd simply append a `=`).\n\n    This time in proper patch form.\n\n ci/lib.sh | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex cee51a4cc4..288a5b3884 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -74,6 +74,9 @@ check_unignored_build_artifacts ()\n \t}\n }\n \n+# Clear MAKEFLAGS that may come from the outside world.\n+export MAKEFLAGS=\n+\n # Set 'exit on error' for all CI scripts to let the caller know that\n # something went wrong.\n # Set tracing executed commands, primarily setting environment variables\n@@ -101,7 +104,7 @@ then\n \tBREW_INSTALL_PACKAGES=\"git-lfs gettext\"\n \texport GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n \texport GIT_TEST_OPTS=\"--verbose-log -x --immediate\"\n-\texport MAKEFLAGS=\"--jobs=2\"\n+\tMAKEFLAGS=\"$MAKEFLAGS --jobs=2\"\n elif test -n \"$SYSTEM_COLLECTIONURI\" || test -n \"$SYSTEM_TASKDEFINITIONSURI\"\n then\n \tCI_TYPE=azure-pipelines\n@@ -126,7 +129,7 @@ then\n \tBREW_INSTALL_PACKAGES=gcc@8\n \texport GIT_PROVE_OPTS=\"--timer --jobs 10 --state=failed,slow,save\"\n \texport GIT_TEST_OPTS=\"--verbose-log -x --write-junit-xml\"\n-\texport MAKEFLAGS=\"--jobs=10\"\n+\tMAKEFLAGS=\"$MAKEFLAGS --jobs=10\"\n \ttest windows_nt != \"$CI_OS_NAME\" ||\n \tGIT_TEST_OPTS=\"--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS\"\n else\n@@ -185,4 +188,4 @@ GIT_TEST_GETTEXT_POISON)\n \t;;\n esac\n \n-export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n+MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n-- \n2.21.0-rc0\n\n"},{"id":"368761","messageId":"20190208001710.GS10587@szeder.dev","threadId":"50427","inReplyTo":"xmqqd0o3mac5.fsf_-_@gitster-ct.c.googlers.com","subject":"Re: [PATCH] ci: clear and mark MAKEFLAGS exported just once","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2019-02-08T00:17:10Z","receivedAt":"2019-02-08T00:17:16Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Thu, Feb 07, 2019 at 03:45:46PM -0800, Junio C Hamano wrote:\n> Clearing it once upfront, and turning all the assignment into\n> appending, would future-proof the code even more, to prevent\n> mistakes the previous one fixed from happening again.\n> \n> Also, mark the variable exported just once at the beginning.  There\n> is no point in marking it exported repeatedly.\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>     >> So I'd rather clear `MAKEFLAGS` at the beginning (i.e. where you `export\n>     >> MAKEFLAGS`, I'd simply append a `=`).\n> \n>     This time in proper patch form.\n\nMakes sense, and the patch looks good to me.\n\n>  ci/lib.sh | 9 ++++++---\n>  1 file changed, 6 insertions(+), 3 deletions(-)\n> \n> diff --git a/ci/lib.sh b/ci/lib.sh\n> index cee51a4cc4..288a5b3884 100755\n> --- a/ci/lib.sh\n> +++ b/ci/lib.sh\n> @@ -74,6 +74,9 @@ check_unignored_build_artifacts ()\n>  \t}\n>  }\n>  \n> +# Clear MAKEFLAGS that may come from the outside world.\n> +export MAKEFLAGS=\n> +\n>  # Set 'exit on error' for all CI scripts to let the caller know that\n>  # something went wrong.\n>  # Set tracing executed commands, primarily setting environment variables\n> @@ -101,7 +104,7 @@ then\n>  \tBREW_INSTALL_PACKAGES=\"git-lfs gettext\"\n>  \texport GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n>  \texport GIT_TEST_OPTS=\"--verbose-log -x --immediate\"\n> -\texport MAKEFLAGS=\"--jobs=2\"\n> +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=2\"\n>  elif test -n \"$SYSTEM_COLLECTIONURI\" || test -n \"$SYSTEM_TASKDEFINITIONSURI\"\n>  then\n>  \tCI_TYPE=azure-pipelines\n> @@ -126,7 +129,7 @@ then\n>  \tBREW_INSTALL_PACKAGES=gcc@8\n>  \texport GIT_PROVE_OPTS=\"--timer --jobs 10 --state=failed,slow,save\"\n>  \texport GIT_TEST_OPTS=\"--verbose-log -x --write-junit-xml\"\n> -\texport MAKEFLAGS=\"--jobs=10\"\n> +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=10\"\n>  \ttest windows_nt != \"$CI_OS_NAME\" ||\n>  \tGIT_TEST_OPTS=\"--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS\"\n>  else\n> @@ -185,4 +188,4 @@ GIT_TEST_GETTEXT_POISON)\n>  \t;;\n>  esac\n>  \n> -export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n> +MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n> -- \n> 2.21.0-rc0\n> \n"},{"id":"368812","messageId":"nycvar.QRO.7.76.6.1902081110310.41@tvgsbejvaqbjf.bet","threadId":"50427","inReplyTo":"xmqqh8dfmawn.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] ci: make sure we build Git parallel","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-02-08T10:10:54Z","receivedAt":"2019-02-08T10:11:01Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 7 Feb 2019, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> >>  \n> >> +# Clear MAKEFLAGS that may come from the outside world.\n> >> +export MAKEFLAGS=\n> >> +\n> >>  # Set 'exit on error' for all CI scripts to let the caller know that\n> >>  # something went wrong.\n> >>  # Set tracing executed commands, primarily setting environment variables\n> >> @@ -101,7 +104,7 @@ then\n> >>  \tBREW_INSTALL_PACKAGES=\"git-lfs gettext\"\n> >>  \texport GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n> >>  \texport GIT_TEST_OPTS=\"--verbose-log -x --immediate\"\n> >> -\texport MAKEFLAGS=\"--jobs=2\"\n> >> +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=2\"\n> >>  elif test -n \"$SYSTEM_COLLECTIONURI\" || test -n \"$SYSTEM_TASKDEFINITIONSURI\"\n> >>  then\n> >>  \tCI_TYPE=azure-pipelines\n> >> @@ -126,7 +129,7 @@ then\n> >>  \tBREW_INSTALL_PACKAGES=gcc@8\n> >>  \texport GIT_PROVE_OPTS=\"--timer --jobs 10 --state=failed,slow,save\"\n> >>  \texport GIT_TEST_OPTS=\"--verbose-log -x --write-junit-xml\"\n> >> -\texport MAKEFLAGS=\"--jobs=10\"\n> >> +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=10\"\n> >>  \ttest windows_nt != \"$CI_OS_NAME\" ||\n> >>  \tGIT_TEST_OPTS=\"--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS\"\n> >>  else\n> >> @@ -185,4 +188,4 @@ GIT_TEST_GETTEXT_POISON)\n> >>  \t;;\n> >>  esac\n> >>  \n> >> -export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n> >> +MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n> >\n> > Since this is intended to be run in a CI setting, there is not a whole lot\n> > of opportunity to set `MAKEFLAGS` outside of the script. And if there is,\n> > that might open a rabbit hole when debugging issues that somehow in the\n> > end turn out to come from a hard-coded `MAKEFLAGS` somewhere in the CI\n> > system.\n> >\n> > So I'd rather clear `MAKEFLAGS` at the beginning (i.e. where you `export\n> > MAKEFLAGS`, I'd simply append a `=`).\n> \n> I meant to clear it at the beginning, where I \"export MAKEFLAGS=\".\n> Did your MUA ate the equal sign at the end, mistaking it with part\n> of text/plain; format=flawed or something?\n\nI could have sworn that there was no equal sign yesterday.\n\nSorry for the noise,\nDscho\n"},{"id":"368813","messageId":"nycvar.QRO.7.76.6.1902081111230.41@tvgsbejvaqbjf.bet","threadId":"50427","inReplyTo":"20190208001710.GS10587@szeder.dev","subject":"Re: [PATCH] ci: clear and mark MAKEFLAGS exported just once","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-02-08T10:11:45Z","receivedAt":"2019-02-08T10:11:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 8 Feb 2019, SZEDER Gábor wrote:\n\n> On Thu, Feb 07, 2019 at 03:45:46PM -0800, Junio C Hamano wrote:\n> > Clearing it once upfront, and turning all the assignment into\n> > appending, would future-proof the code even more, to prevent\n> > mistakes the previous one fixed from happening again.\n> > \n> > Also, mark the variable exported just once at the beginning.  There\n> > is no point in marking it exported repeatedly.\n> > \n> > Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> > ---\n> >     >> So I'd rather clear `MAKEFLAGS` at the beginning (i.e. where\n> >     >> you `export MAKEFLAGS`, I'd simply append a `=`).\n> > \n> >     This time in proper patch form.\n> \n> Makes sense, and the patch looks good to me.\n\nTo me, too.\n\nThank you,\nDscho\n\n> \n> >  ci/lib.sh | 9 ++++++---\n> >  1 file changed, 6 insertions(+), 3 deletions(-)\n> > \n> > diff --git a/ci/lib.sh b/ci/lib.sh\n> > index cee51a4cc4..288a5b3884 100755\n> > --- a/ci/lib.sh\n> > +++ b/ci/lib.sh\n> > @@ -74,6 +74,9 @@ check_unignored_build_artifacts ()\n> >  \t}\n> >  }\n> >  \n> > +# Clear MAKEFLAGS that may come from the outside world.\n> > +export MAKEFLAGS=\n> > +\n> >  # Set 'exit on error' for all CI scripts to let the caller know that\n> >  # something went wrong.\n> >  # Set tracing executed commands, primarily setting environment variables\n> > @@ -101,7 +104,7 @@ then\n> >  \tBREW_INSTALL_PACKAGES=\"git-lfs gettext\"\n> >  \texport GIT_PROVE_OPTS=\"--timer --jobs 3 --state=failed,slow,save\"\n> >  \texport GIT_TEST_OPTS=\"--verbose-log -x --immediate\"\n> > -\texport MAKEFLAGS=\"--jobs=2\"\n> > +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=2\"\n> >  elif test -n \"$SYSTEM_COLLECTIONURI\" || test -n \"$SYSTEM_TASKDEFINITIONSURI\"\n> >  then\n> >  \tCI_TYPE=azure-pipelines\n> > @@ -126,7 +129,7 @@ then\n> >  \tBREW_INSTALL_PACKAGES=gcc@8\n> >  \texport GIT_PROVE_OPTS=\"--timer --jobs 10 --state=failed,slow,save\"\n> >  \texport GIT_TEST_OPTS=\"--verbose-log -x --write-junit-xml\"\n> > -\texport MAKEFLAGS=\"--jobs=10\"\n> > +\tMAKEFLAGS=\"$MAKEFLAGS --jobs=10\"\n> >  \ttest windows_nt != \"$CI_OS_NAME\" ||\n> >  \tGIT_TEST_OPTS=\"--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS\"\n> >  else\n> > @@ -185,4 +188,4 @@ GIT_TEST_GETTEXT_POISON)\n> >  \t;;\n> >  esac\n> >  \n> > -export MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n> > +MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n> > -- \n> > 2.21.0-rc0\n> > \n> "},{"id":"368843","messageId":"xmqqva1ukx9m.fsf@gitster-ct.c.googlers.com","threadId":"50427","inReplyTo":"nycvar.QRO.7.76.6.1902081110310.41@tvgsbejvaqbjf.bet","subject":"Re: [PATCH] ci: make sure we build Git parallel","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-02-08T17:25:41Z","receivedAt":"2019-02-08T17:25:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Junio,\n>\n> On Thu, 7 Feb 2019, Junio C Hamano wrote:\n>\n>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>> \n>> >>  \n>> >> +# Clear MAKEFLAGS that may come from the outside world.\n>> >> +export MAKEFLAGS=\n>> >> +\n>> ...\n>> I meant to clear it at the beginning, where I \"export MAKEFLAGS=\".\n>> Did your MUA ate the equal sign at the end, mistaking it with part\n>> of text/plain; format=flawed or something?\n>\n> I could have sworn that there was no equal sign yesterday.\n>\n> Sorry for the noise,\n\nDon't be.  Mistakes happen and watching stupid mistakes for each\nother is part of the teamwork I very much appreciate.\n\nWill apply on top of Szeder's fix.  Thanks.\n"}]}