Re: [PATCH v4 03/10] submodule sync: skip work for inactive submodules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/16, Junio C Hamano wrote:
> Stefan Beller <sbeller@xxxxxxxxxx> writes:
> 
> > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams <bmwill@xxxxxxxxxx> 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@xxxxxxxxxx>
> >> ---
> >
> >> +               # 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.
> 

Yeah you're right.  I was just moving around the code that was already
there.  But this line is removed in the next patch anyways so it
probably doesn't matter much.

-- 
Brandon Williams



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]