From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: Re: [PATCH v2 0/2] ci(GitHub): mark up compile errors, too
Date: Mon, 13 Jun 2022 10:08:25 -0700 [thread overview]
Message-ID: <xmqq35g88p9y.fsf@gitster.g> (raw)
In-Reply-To: <pull.1253.v2.git.1655125988.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Mon, 13 Jun 2022 13:13:06 +0000")
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:
> * The curly bracket construct was replaced by a proper subshell, to avoid
> jumbled output and a race where the exit.status file could be read before
> it was written.
I do prefer () when making a subshell in a case like this (e.g.
upstream of a pipe), so I am happy with this version, but the above
is curious.
I am not sure how "jumbled output" is possible, let alone "reading
exit.status before it is written". The output goes to sed to be
processed either way, nobody else other than "$@" produces such an
output from there, and sed would not exit until it finishes reading
from the upstream so res=$(cat exit.status) won't kick in before the
upstream exits.
Anyway, thanks, will queue.
> Johannes Schindelin (2):
> ci(github): use grouping also in the `win-build` job
> ci(github): also mark up compile errors
>
> ci/lib.sh | 10 ++++++++--
> ci/make-test-artifacts.sh | 2 +-
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
>
> base-commit: 3069f2a6f4c38e7e599067d2e4a8e31b4f53e2d3
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1253%2Fdscho%2Fci-mark-up-compile-failures-v2
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1253/dscho/ci-mark-up-compile-failures-v2
> Pull-Request: https://github.com/gitgitgadget/git/pull/1253
>
> Range-diff vs v1:
>
> 1: 5212c5ec474 = 1: 5212c5ec474 ci(github): use grouping also in the `win-build` job
> 2: 19d6e34f038 ! 2: 34daf06bb71 ci(github): also mark up compile errors
> @@ ci/lib.sh: else
> - "$@"
> - res=$?
> + # work around `dash` not supporting `set -o pipefail`
> -+ {
> ++ (
> + "$@" 2>&1
> + echo $? >exit.status
> -+ } |
> -+ sed 's/^\(\([^ ]*\):\([0-9]*\):\([0-9]*:\) \)\(error\|warning\): /::\5 file=\2 line=\3::\1/'
> ++ ) |
> ++ sed 's/^\(\([^ ]*\):\([0-9]*\):\([0-9]*:\) \)\(error\|warning\): /::\5 file=\2,line=\3::\1/'
> + res=$(cat exit.status)
> + rm exit.status
> end_group
next prev parent reply other threads:[~2022-06-13 19:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 11:32 [PATCH 0/2] ci(GitHub): mark up compile errors, too Johannes Schindelin via GitGitGadget
2022-06-09 11:32 ` [PATCH 1/2] ci(github): use grouping also in the `win-build` job Johannes Schindelin via GitGitGadget
2022-06-09 11:32 ` [PATCH 2/2] ci(github): also mark up compile errors Johannes Schindelin via GitGitGadget
2022-06-09 13:47 ` Ævar Arnfjörð Bjarmason
2022-06-10 16:30 ` Junio C Hamano
2022-06-09 23:56 ` [PATCH 0/2] ci(GitHub): mark up compile errors, too Junio C Hamano
2022-06-13 13:13 ` [PATCH v2 " Johannes Schindelin via GitGitGadget
2022-06-13 13:13 ` [PATCH v2 1/2] ci(github): use grouping also in the `win-build` job Johannes Schindelin via GitGitGadget
2022-06-13 13:13 ` [PATCH v2 2/2] ci(github): also mark up compile errors Johannes Schindelin via GitGitGadget
2022-06-13 17:08 ` Junio C Hamano [this message]
2022-06-13 22:41 ` [PATCH v2 0/2] ci(GitHub): mark up compile errors, too Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq35g88p9y.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.