2013/6/27 Junio C Hamano <gitster@xxxxxxxxx>: >> + } else { >> + i++; >> + j++; >> + } >> + } >> + >> + if ( >> + /* "prefix" seems like prefix of "in" */ >> + i >= prefix_len && > > So shouldn't this be "i == prefix_len"? > >> + /* >> + * 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html