Re: [PATCH] Avoid bug in Solaris xpg4/sed as used in submodule
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 10, 2012, 16:10 UTC
- Message-ID
- <7vhawrqzue.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <m262d8j8dv.fsf@igel.home>
Andreas Schwab <schwab@linux-m68k.org> writes:
Show 10 quoted lines
> Junio C Hamano <gitster@pobox.com> 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.