# RFC][Feature] submodule: teach subcommand 'summary' to give summary for nested submodules

6 messages from 2020-03-18 to 2020-03-24. Participants: Shourya Shukla, Junio C Hamano, Christian Couder.
Thread: https://gitlist.dev/t/53021

## Shourya Shukla, 2020-03-18 16:32

Subject: RFC][Feature] submodule: teach subcommand 'summary' to give summary for nested submodules
Message-ID: <20200318163234.21628-1-shouryashukla.oo@gmail.com>
URL: https://gitlist.dev/e/20200318163234.21628-1-shouryashukla.oo%40gmail.com

```
Hello everyone,

I was converting the subcommand 'summary'(of command submodule) from shell to C and I realised that
the subcommand does not have a '--recursive' option in it, meaning it cannot give out summaries of nested
submodules. My opinion on this is that an option should maybe exist for the same.

What are the community's thoughts on this? Should the aforementioned option be added? Is there any feasibility
of this option in this case?

Regards,
Shourya Shukla

```

## Junio C Hamano, 2020-03-18 19:48

Subject: Re: [RFC][Feature] submodule: teach subcommand 'summary' to give summary for nested submodules
Message-ID: <xmqqh7ylfnqi.fsf@gitster.c.googlers.com>
URL: https://gitlist.dev/e/xmqqh7ylfnqi.fsf%40gitster.c.googlers.com
In-Reply-To: <20200318163234.21628-1-shouryashukla.oo@gmail.com>

```
Shourya Shukla <shouryashukla.oo@gmail.com> writes:

> I was converting the subcommand 'summary'(of command submodule)
> from shell to C and I realised that the subcommand does not have a
> '--recursive' option in it, meaning it cannot give out summaries
> of nested submodules. My opinion on this is that an option should
> maybe exist for the same.
>
> What are the community's thoughts on this? Should the
> aforementioned option be added? Is there any feasibility of this
> option in this case?

If "git submodule summary --recursive" errors out with today's code,
no sane user would be using it for any useful purpose, so I would
think it is OK to add such a feature.

If it makes a usable UI for large projects that you can only choose
between "include no subsubmodules" (i.e. with --no-recursive) or
"include all sub(sub)*modules" (i.e. with --recursive) is another
matter, though.

```

## Shourya Shukla, 2020-03-19 17:16

Subject: Re: Re: RFC][Feature] submodule
Message-ID: <20200319171626.5723-1-shouryashukla.oo@gmail.com>
URL: https://gitlist.dev/e/20200319171626.5723-1-shouryashukla.oo%40gmail.com
In-Reply-To: <xmqqh7ylfnqi.fsf@gitster.c.googlers.com>

```
Hello Junio,

> If "git submodule summary --recursive" errors out with today's code,
> no sane user would be using it for any useful purpose, so I would
> think it is OK to add such a feature.

Sure thing! I will try to plan some makeshift implementation.

> If it makes a usable UI for large projects that you can only choose
> between "include no subsubmodules" (i.e. with --no-recursive) or
> "include all sub(sub)*modules" (i.e. with --recursive) is another
> matter, though.

I think discussing this idea may be a good approach right now? What
you are saying for large projects does provoke thought though..
Also, what do you think may become a problem for large projects in
here?

Thank you so much for the feedback BTW :)

Regards,
Shourya Shukla

```

## Junio C Hamano, 2020-03-19 21:33

Subject: Re: RFC][Feature] submodule
Message-ID: <xmqqh7ykdo7e.fsf@gitster.c.googlers.com>
URL: https://gitlist.dev/e/xmqqh7ykdo7e.fsf%40gitster.c.googlers.com
In-Reply-To: <20200319171626.5723-1-shouryashukla.oo@gmail.com>

```
Shourya Shukla <shouryashukla.oo@gmail.com> writes:

> Also, what do you think may become a problem for large projects in
> here?

Perhaps

    "We want submodule A and B's sub(sub)*modules all the way down
    to the leaf submodule, but directory C houses many submodules,
    among which only one can be active, and we want C/X and its
    sub(sub)*modules all the way down to the leaf but not C/Y nor
    C/Z or any other C/<anything>."

and similar requests along the line.

```

## Shourya Shukla, 2020-03-20 16:08

Subject: Re: Re: [RFC][Feature]
Message-ID: <20200320160813.9242-1-shouryashukla.oo@gmail.com>
URL: https://gitlist.dev/e/20200320160813.9242-1-shouryashukla.oo%40gmail.com
In-Reply-To: <xmqqh7ykdo7e.fsf@gitster.c.googlers.com>

```
>    "We want submodule A and B's sub(sub)*modules all the way down
>    to the leaf submodule, but directory C houses many submodules,
>    among which only one can be active, and we want C/X and its
>    sub(sub)*modules all the way down to the leaf but not C/Y nor
>    C/Z or any other C/<anything>."

That's a tough one. Would you advise developing the feature which may
work atleast for the "normal" cases? In case it does not work for the
aforementioned case and the like, we classify it as a BUG for further
correction?

Regards,
Shourya Shukla


```

## Christian Couder, 2020-03-24 07:29

Subject: Re: Re: [RFC][Feature]
Message-ID: <CAP8UFD2nfqRX6+xjRk=F1g+t9T=FgxQVsaNt+b+jW8XoYzuTDQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAP8UFD2nfqRX6%2BxjRk%3DF1g%2Bt9T%3DFgxQVsaNt%2Bb%2BjW8XoYzuTDQ%40mail.gmail.com
In-Reply-To: <20200320160813.9242-1-shouryashukla.oo@gmail.com>

```
On Fri, Mar 20, 2020 at 5:08 PM Shourya Shukla
<shouryashukla.oo@gmail.com> wrote:
>
> >    "We want submodule A and B's sub(sub)*modules all the way down
> >    to the leaf submodule, but directory C houses many submodules,
> >    among which only one can be active, and we want C/X and its
> >    sub(sub)*modules all the way down to the leaf but not C/Y nor
> >    C/Z or any other C/<anything>."
>
> That's a tough one. Would you advise developing the feature which may
> work atleast for the "normal" cases? In case it does not work for the
> aforementioned case and the like, we classify it as a BUG for further
> correction?

How are the other git-submodule sub-commands working with --recursive?
Shouldn't --recursive work in the same way for all the sub-commands?

```
