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

Re: [PATCH] git-submodule.sh: avoid "test <cond> -a/-o <cond>"

From
Torsten Bögershausen <tboegi@web.de>
Date
Jun 10, 2014, 14:52 UTC
Message-ID
<53971BBE.8030108@web.de>
In-Reply-To
<1402403313-22468-1-git-send-email-gitter.spiros@gmail.com>

On 2014-06-10 14.28, Elia Pinto wrote: []

Show 9 quoted lines
>  		# before the first commit: compare with an empty tree
>  		head=$(git hash-object -w -t tree --stdin </dev/null)
> @@ -1056,13 +1056,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])

Does this look strange? ^ Should it be case "$status" in D|T)

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 8 in “git-submodule.sh: avoid "test <cond> -a/-o <cond>"”
  1. git-submodule.sh: avoid "test <cond> -a/-o <cond>"Elia Pinto, Jun 10, 2014
  2. Junio C HamanoJun 10, 2014
  3. Torsten BögershausenJun 10, 2014
  4. Junio C HamanoJun 10, 2014
  5. Junio C HamanoJun 10, 2014
  6. Junio C HamanoJun 10, 2014
  7. Johannes SixtJun 10, 2014
  8. Junio C HamanoJun 10, 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.