Re: [PATCH v4 03/10] submodule sync: skip work for inactive submodules
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 17, 2017, 05:26 UTC
- Message-ID
- <xmqq8to4a2xv.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kaP9ob+qvso=pV=PPaB5guaW18w297xA+bfDFASV0zibg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 11 quoted lines
> On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams <bmwill@google.com> wrote: >> Sync does some work determining what URLs should be used for a submodule >> but then throws this work away if the submodule isn't active. Instead >> perform the activity check earlier and skip inactive submodule in order >> to avoid doing unnecessary work. >> >> Signed-off-by: Brandon Williams <bmwill@google.com> >> --- > >> + # skip inactive submodules >> + if ! git config "submodule.$name.url" >/dev/null 2>/dev/null
Just a style thing, but ">/dev/null 2>&1" is probably shorter and more idiomatic.