Hi Junio, Thank you very much for your advice. > > If you are hooking into "git log", it already has "-M / -C / -C -C" as a > notion to express "different levels of digging" to find code movement and > copies, and so does "git blame". You probably will save a lot of time if > you studied the current blame implementation thouroughly before designing > or coding. Yes, both blame and log has such '-M/-C/-C -C/' options. But the meaning are not very same: For 'git log': -M is used to detect file rename, -C is used to trace code copy. Both options accept no argument. For 'git blame': -M is used to trace code move, -C is used to trace code copy. And both options accept a <num> which specify the lower bound of the 'same code characters'. And, I think the line-level history tool act more like 'git blame'. So, the '-C' option for 'git log' is exactly what we need but '-M' is not. So, I think, maybe we should add another '-m' option to 'git log' for line-level code movement detect. I have make a rough look over blame.c, it is really very helpful and I find I can borrow some code from 'git blame' to make the line-level history browser. Thanks a lot! > > Two things that you need to think about carefully is why "blame" stops at > the commits it shows, and if you could "peel" these lines in its output to > peek what are behind the lines, what you would see. This is not a rocket > science topic, but it is not entirely trivial. I think blame's purpose is to find who is responsible for which line of code. So, it stop after it find the origin of the code. And line-level history browser will continue back into more history on what blame got, it will find what the line should be before this commit, and go backward the history based on the origin line to get a more old status and go on again. Simply, it is something like 'git blame' recursively. :) Thanks again for your advice, I get too much from your feedback, thanks! Regards! Bo -- 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