From: Jeff King Date: Mon, 06 Feb 2017 15:50:13 GMT Subject: Re: [PATCH v3 3/5] stash: add test for the create command line arguments Message-ID: <20170206155012.rb2vydjvlquchwk2@sigill.intra.peff.net> In-Reply-To: <20170205202642.14216-4-t.gummerer@gmail.com> On Sun, Feb 05, 2017 at 08:26:40PM +0000, Thomas Gummerer wrote: > +test_expect_success 'create stores correct message' ' > + >foo && > + git add foo && > + STASH_ID=$(git stash create "create test message") && > + echo "On master: create test message" >expect && > + git show --pretty=%s ${STASH_ID} | head -n1 >actual && > + test_cmp expect actual > +' This misses failure exit codes from "git show" because it's on the left side of a pipe. Perhaps "git show -s" or "git log -1" would get you the same output without needing "head" (and saving a process and the time spent generating the diff, as a bonus). Ditto in the other tests from this patch and later ones. -Peff