Re: [PATCH 2/3] t7502-commit: add summary output tests for empty and merge commits

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

 



Tay Ray Chuan <rctay89@xxxxxxxxx> writes:

> After c197702 (pretty: Respect --abbrev option), non-abbreviated hashes
> began to appear, leading to failures for these tests.
>
> Signed-off-by: Tay Ray Chuan <rctay89@xxxxxxxxx>
> ---
>  t/t7502-commit.sh |   29 +++++++++++++++++++++++++++--
>  1 files changed, 27 insertions(+), 2 deletions(-)
>
> diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
> index 589e8e6..8a4a277 100755
> --- a/t/t7502-commit.sh
> +++ b/t/t7502-commit.sh
> @@ -4,10 +4,10 @@ test_description='git commit porcelain-ish'
>  
>  . ./test-lib.sh
>  
> -# Arguments: [<prefix] [<commit message>]
> +# Arguments: [<prefix] [<commit message>] [<commit options>]
>  check_summary_oneline() {
>  	test_tick &&
> -	git commit -m "$2" | head -1 > act &&
> +	echo "$3" | xargs git commit -m "$2" | head -1 > act &&

Why do you have to fork xargs?  Wouldn't/shouldn't

    git commit ${3+"$3"} -m "$2"

work?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]