Re: [Outreachy][PATCH v3] t6050: avoid pipes with downstream Git commands

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

 



chizobajames21@xxxxxxxxx writes:

> From: Chizoba ODINAKA <chizobajames21@xxxxxxxxx>
>
> In pipes, the exit code of a chain of commands is determined by
> the final command. In order not to miss the exit code of a failed
> Git command, avoid pipes instead write output of Git commands
> into a file.
> For better debugging experience, instances of "grep" were changed
> to "test_grep". "test_grep" provides more context in case of a
> failed "grep".
>
> Signed-off-by: Chizoba ODINAKA <chizobajames21@xxxxxxxxx>
> ---
> Changes in v3:
> - remove some duplicated lines of code
> - fixed some typo, an ommitted input redirection sign, <,
>   and another omitted logic negation operator, !

I'd suggest looking at your commit title again.  "with downstream
Git commands" sounds like the git being tested is at the tail, not
in front, of a pipeline, which would be perfectly OK arrangement to
see what its exit status is.

The updated patch does indeed use such a construct, e.g.

> +	git cat-file commit $HASH2 >actual &&
> +	test_grep "author A U Thor" actual &&
> +	R=$(sed -e "s/A U/O/" actual | git hash-object -t commit --stdin -w) &&

here.

    Subject: [Outreachy][PATCH v3] t6050: don't lose exit status of Git to pipes

or something, perhaps.

Other than that, looking very good.  Big thanks to all of you.





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

  Powered by Linux