Re: [PATCH] diff: prevent pprint_rename from underrunning input

2013-02-27 Thread Antoine Pelisse
The logic described in d020e27 (diff: Fix rename pretty-print when suffix and prefix overlap, 2013-02-23) is wrong: The proof in the comment is valid only if both strings are the same length. *One* of old/new can reach a-1 (b-1, resp.) if 'a' is a suffix of 'b' (or vice versa). Indeed,

[PATCH] diff: prevent pprint_rename from underrunning input

2013-02-26 Thread Thomas Rast
The logic described in d020e27 (diff: Fix rename pretty-print when suffix and prefix overlap, 2013-02-23) is wrong: The proof in the comment is valid only if both strings are the same length. *One* of old/new can reach a-1 (b-1, resp.) if 'a' is a suffix of 'b' (or vice versa). Since the intent

Re: [PATCH] diff: prevent pprint_rename from underrunning input

2013-02-26 Thread Junio C Hamano
Thomas Rast tr...@student.ethz.ch writes: The logic described in d020e27 (diff: Fix rename pretty-print when suffix and prefix overlap, 2013-02-23) is wrong: The proof in the comment is valid only if both strings are the same length. *One* of old/new can reach a-1 (b-1, resp.) if 'a' is a