From: Ævar Arnfjörð Bjarmason Date: Mon, 22 Nov 2021 11:14:14 GMT Subject: Re: [PATCH v2 1/1] ls-tree.c: support `--oid-only` option for "git-ls-tree" Message-ID: <211122.8635no1lwp.gmgdl@evledraar.gmail.com> In-Reply-To: <20211122074538.87255-1-dyroneteng@gmail.com> On Mon, Nov 22 2021, Teng Long wrote: > On Fri, 19 Nov 2021 14:30:52 +0100, Ævar Arnfjörð Bjarmason wrote >> just cut -f1 instead of awk? Also don't put "git" on the LHS of a pipe, >> it might hide segfaults. Also applies to the below. >> > > Will apply, and could you please describe the problem with more details? > (appreciate if there is an executable example) Run this in a terminal: git stawtus | cat; echo $?; The LHS of the pipe fails, but the exit code of that command is hidden. So we prefer: git stawtus >out && # fails [...]