From: Junio C Hamano Date: Tue, 10 Apr 2012 16:10:22 GMT Subject: Re: [PATCH] Avoid bug in Solaris xpg4/sed as used in submodule Message-ID: <7vhawrqzue.fsf@alter.siamese.dyndns.org> In-Reply-To: Andreas Schwab writes: > Junio C Hamano writes: > >> FWIW, it bothers me a lot more that expression does not anchor >> matches against path elements with explicit '/' than the issue your patch >> addresses, i.e. >> >> sed -e 's|[^/][^/]*/|../|g' > > Note that this requires readding a trailing slash to the path, which > complicates the whole thing a bit. Or simply swapping order of the stripping and sed invocation, which is not a big deal. I personally find the pattern with trailing '/' easier to grok but it is also not a big deal.