Re: [PATCH v3 3/5] stash: add test for the create command line arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]