From: SZEDER Gábor Date: Tue, 05 Jun 2018 15:45:01 GMT Subject: Re: [PATCH v7 1/8] checkout tests: index should be clean after dwim checkout Message-ID: <20180605154501.13502-1-szeder.dev@gmail.com> In-Reply-To: <20180605144049.26488-2-avarab@gmail.com> > diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh > index 3e5ac81bd2..ed32828105 100755 > --- a/t/t2024-checkout-dwim.sh > +++ b/t/t2024-checkout-dwim.sh > @@ -23,6 +23,12 @@ test_branch_upstream () { > test_cmp expect.upstream actual.upstream > } > > +status_uno_is_clean() { > + >status.expect && > + git status -uno --porcelain >status.actual && > + test_cmp status.expect status.actual This function could be written a tad simpler as: git status -uno --porcelain >status.actual && test_must_be_empty status.actual