2013/6/27 Junio C Hamano [off-list ref]:
quoted
+ } else {
+ i++;
+ j++;
+ }
+ }
+
+ if (
+ /* "prefix" seems like prefix of "in" */
+ i >= prefix_len &&
So shouldn't this be "i == prefix_len"?
quoted
+ /*
+ * but "/foo" is not a prefix of "/foobar"
+ * (i.e. prefix not end with '/')
+ */
+ prefix_off < prefix_len) {
+ if (j >= in_len) {
Again, "j == in_len", isn't it? Or can i and j overrun in_len and
prefix_len?
Yes, better write as ==. But both will pass the test cases.
Since this commit has been merged to next, so let it be?
--
Jiang Xin