Re: [PATCH 3/7] Extract, test and enhance the logic to collapse ../foo paths.
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Sep 26, 2012, 20:58 UTC
- Message-ID
- <20120926205851.GA2166@dcvr.yhbt.net>
- In-Reply-To
- <20120926194504.GA5013@elie.Belkin>
Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 17 quoted lines
> Hi, > > Michael G Schwern wrote: > > On 2012.7.30 12:51 PM, Eric Wong wrote: > >> Michael G Schwern wrote: > > >>> _collapse_dotdot() works better than the existing regex did. > >> > >> I don't dispute it's better, but it's worth explaining in the commit > >> message to reviewers why something is "better". > > > > Yeah. I figured the tests covered that. > > Now I'm tripping up on the same thing. Eric, did you ever find out > what the motivation for this patch was? Is SVN 1.7 more persnickety > about runs of multiple slashes in a row or something, or is it more > of an aesthetic thing?
I'm not sure about this case specifically, but SVN has (and will likely become) more persnickety over time. I haven't had a chance to check SVN itself, but I think being defensive and giving it prettier paths will be safer in the future.
That said, I'd favor an implementation that split on m{/+} and collapsed as Michael mentioned.