From: Junio C Hamano Date: Wed, 13 May 2020 15:35:34 GMT Subject: Re: [PATCH] submodule--helper.c: add only-active to foreach Message-ID: In-Reply-To: Guillaume Galeazzi writes: >> git submodule foreach --trait=is-active ... >> git submodule foreach --trait=!is-active ... >> git submodule foreach --trait=is-populated ... >> >> to allow iterating only on submodules with/without given trait (I am >> not suggesting the actual option name, but merely making sure that >> 'is-active' is not anything special but one of the possibilities >> that can be used to limit the iteration using the same mechanism). > > The idea that other candidate are possible seem good. But then users > will need combination like is-active && !is-populated. ... > ... this would allow combination with the is active filter and the > previous example would be > > git submodule--helper --is-active --is-populated=false There is no difference between that and git submodule--helper --trait=is-active --trait=is-populated so I fail to see what new you are proposing, sorry.