Re: [PATCH v3 3/5] stash: add test for the create command line arguments
- From
Jeff King <peff@peff.net>
- Date
- Feb 6, 2017, 15:50 UTC
- 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:
Show 8 quoted lines
> +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