From: Stefan Beller Date: Wed, 28 Mar 2018 21:37:31 GMT Subject: Re: [PATCH] submodule: check for NULL return of get_submodule_ref_store() Message-ID: In-Reply-To: <38570708-e166-0004-878a-2d8442c12b65@web.de> > This looks nicer here in the script, but doesn't test exactly what users > type most of the time, I suppose. > > So how about this? Looks good to me, though I had a nagging feeling at first that the regex could be made more concise. Why do we need the optional "[^ ]" inside \1 ? > + sed -e "s/^ \([^ ]* repo\) .*/-\1/" expect &&