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

Re: [PATCH v3 3/4] get rid of "git submodule summary --for-status"

From
Jens Lehmann <jens.lehmann@web.de>
Date
Aug 30, 2013, 19:40 UTC
Message-ID
<5220F539.9050700@web.de>
In-Reply-To
<vpqioyonqdn.fsf@anie.imag.fr>
Am 29.08.2013 23:23, schrieb Matthieu Moy:
Show 16 quoted lines
> Jens Lehmann <Jens.Lehmann@web.de> writes:
> 
>> Am 29.08.2013 15:05, schrieb Matthieu Moy:
>>> The --for-status option was an undocumented option used only by
>>> wt-status.c, which inserted a header and commented out the output. We can
>>> achieve the same result within wt-status.c, without polluting the
>>> submodule command-line options.
>>>
>>> This will make it easier to disable the comments from wt-status.c later.
>>
>> Cool, thanks for implementing this!
>>
>> But unfortunately this change collides with bc/submodule-status-ignored
>> (I added Brian to the CC) which is currently on its way to next.
> 
> Thanks for pointing that out. The patch looks buggy:
Ok, I'll tak
Show 38 quoted lines
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -1036,6 +1036,13 @@ cmd_summary() {
>                 do
>                         # Always show modules deleted or type-changed (blob<->module)
>                         test $status = D -o $status = T && echo "$sm_path" && continue
> +                       # Respect the ignore setting for --for-status.
> +                       if test -n $for_status
> +                       then
> +                               name=$(module_name "$sm_path")
> +                               ignore_config=$(get_submodule_config "$name" ignore none)
> +                               test $status != A -a $ignore_config = all && continue
> +                       fi
> 
> Because of the missing quotes around $for_status, it seems the test is
> unconditionnaly true:
> 
> $ test -n t ; echo $?
> 0
> $ test -n   ; echo $?
> 0
> 
> This makes me wonder why the ignore configuration should be considered
> only with --for-status. Why not turn that into
> 
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -1036,6 +1036,13 @@ cmd_summary() {
>                 do
>                         # Always show modules deleted or type-changed (blob<->module)
>                         test $status = D -o $status = T && echo "$sm_path" && continue
> +			# Respect the ignore setting
> +			name=$(module_name "$sm_path")
> +			ignore_config=$(get_submodule_config "$name" ignore none)
> +			test $status != A -a $ignore_config = all && continue
> 
> ?
> 
Previous: Matthieu MoyNext: Jens Lehmann
Message 7 of 16 in “Disable "git status" comment prefix”
  1. 0/4 Disable "git status" comment prefixMatthieu Moy, Aug 29, 2013
  2. 1/4 builtin/stripspace.c: fix broken indentationMatthieu Moy, Aug 29, 2013
  3. 2/4 wt-status: use argv_array APIMatthieu Moy, Aug 29, 2013
  4. 3/4 get rid of "git submodule summary --for-status"Matthieu Moy, Aug 29, 2013
  5. Jens LehmannAug 29, 2013
  6. Matthieu MoyAug 29, 2013
  7. Jens LehmannAug 30, 2013
  8. Jens LehmannAug 30, 2013
  9. Jens LehmannAug 30, 2013
  10. brian m. carlsonAug 31, 2013
  11. Jens LehmannSep 1, 2013
  12. Jens LehmannSep 3, 2013
  13. Junio C HamanoAug 29, 2013
  14. Matthieu MoyAug 29, 2013
  15. 4/4 status: introduce status.displayCommentChar to disable display of #Matthieu Moy, Aug 29, 2013
  16. Junio C HamanoAug 29, 2013

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.