How to achieve "git diff --numstat" with additional moved lines stats - Stack Overflow

This is for a javascript app, so no UI needed.My goal is to get stats of changes between 2 commits, ba

This is for a javascript app, so no UI needed.

My goal is to get stats of changes between 2 commits, basically exactly what git diff --numstat does, but also, along with the additions and deletions count, i would want to have "lines moved out", "lines moved in" and "lines moved internally (from one place in the file to another)" stats for each file.

Is my best bet just running diff with --color-moved and manually storing all moved lines and then in js post-processing determine if they "ended up in/came from" some other place in that file, or were moved out/in from some other file (doesn't matter which one)

Efficiency is important, and this feels kind of wasteful because --color-moved already does all the heavy work needed, but doesn't expose and track these stats, which would be trivial.

There are a bunch of existing tools for extending the diffing experience but AFAIK none have any feature like this?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744253985a4565305.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信