From: Đoàn Trần Công Danh Date: Sat, 21 Aug 2021 01:36:34 GMT Subject: [PATCH v3 2/2] t6300: check for cat-file exit status code Message-ID: <83d532528bce7cb475833a504a244aa945fe048d.1629509531.git.congdanhqx@gmail.com> In-Reply-To: In test_atom(), we're piping the output of cat-file to tail(1), thus, losing its exit status. Let's use a temporary file to preserve git exit status code. Signed-off-by: Đoàn Trần Công Danh --- Junio wrote: > It is not wrong per-se, but do we need a redirect '<' here? "tail" > takes filename(s) on the command line, but is there a reason to feed > the contents from the standard input? Well, no reason. In v1, I replaced the left hand side of pipe with out && + expect=$(tail -n +6 out | wc -c) && + rm -f out ;; tree | blob) expect="" ;; commit) -- 2.33.0.254.g68ee769121