git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCHv2 10/19] git-submodule.sh: convert test -a/-o to && and ||

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
May 22, 2014, 06:49 UTC
Message-ID
<vpqha4is3yd.fsf@anie.imag.fr>
In-Reply-To
<1400682255-17616-1-git-send-email-gitter.spiros@gmail.com>
Elia Pinto <gitter.spiros@gmail.com> writes:
> This is version 2 of the patch to git-submodule of the 
> patch series "convert  test -a/-o to && and ||". 
> It contains the fixes identified by Johannes and
> Matthieu. 
This version of the patch (not the whole series) is
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Some comments for next time:
* I agree with Johannes that splitting the series with one patch per
  file is not the right way to split. As a reviewer, I want to
  - check that -a trivially translates to &&
  - check that -o trivially translates to ||
  - check non-trivial cases
  Interleaving these cases (especially the trivial and non-trivial
  cases) makes the review much harder. For this kind of series, the
  change is trivial, but the review is not (Johannes caught a || Vs &&
  inversion that I didn't find for example, which is quite serious), so
  the "optimize your patches for review" is even more important than
  usual.
* Again, to avoid mixing trivial and non-trivial changes, ...
Show 10 quoted lines
> @@ -1059,13 +1059,17 @@ cmd_summary() {
>  		while read mod_src mod_dst sha1_src sha1_dst status sm_path
>  		do
>  			# Always show modules deleted or type-changed (blob<->module)
> -			test $status = D -o $status = T && echo "$sm_path" && continue
> +			case "$status" in
> +			[DT])
> +				printf '%s\n' "$sm_path" &&
> +				continue
> +			esac

turning a echo into a printf is good, but would be better done separately.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Elia PintoNext: Elia Pinto
Message 2 of 4 in “[PATCHv2 10/19] git-submodule.sh: convert test -a/-o to && and ||”
  1. Elia PintoMay 21, 2014
  2. Matthieu MoyMay 22, 2014
  3. Elia PintoMay 22, 2014
  4. Johannes SixtMay 22, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.