From: Mike Hommey Date: Tue, 03 May 2016 22:50:51 GMT Subject: Re: [PATCH v4 08/11] connect: change the --diag-url output to separate user and host Message-ID: <20160503225051.GB21973@glandium.org> In-Reply-To: On Tue, May 03, 2016 at 01:23:37PM -0400, Eric Sunshine wrote: > On Tue, May 3, 2016 at 12:20 PM, Torsten Bögershausen wrote: > > On 2016-05-03 10.50, Mike Hommey wrote: > >> - git fetch-pack --diag-url "$1" | grep -v host= | grep -v port= >actual && > >> + git fetch-pack --diag-url "$1" | grep -v user= | grep -v host= | grep -v port= >actual && > > Running grep a couple of times is probably not optimal in terms of spawning a > > process.... > > Does > > > > git fetch-pack --diag-url "$1" | egrep -v "user=|host=|port=" >actual && > > work ? > > or the version like this: > > git fetch-pack --diag-url "$1" | egrep -v "(user|host|port)=" >actual && > > I always worry about portability problems with these "advanced" > expressions in grep and sed, however, both of these work fine under > Mac OS X and FreeBSD (which is where problems often manifest). That was my concern. But it looks like we already rely on the egrep "(|)" form working in some other test, so I guess it's fine to use that. Mike