Skip to content

stat or numstat #944

Answered by jelmer
markfink asked this question in Q&A
Discussion options

You must be logged in to vote

There are porcelain.log() and porcelain.diff that provide behaviour similar to "git log" and "git diff".

Are you looking for the number of deleted/added lines per file for every comnmit? If so, you could probably iterate over all relevant commits with Repo.walk, then generate a diff using the functions in ``dulwich.patch` and then filter the whole patch through something like the diffstat utility (or a homegrown implementation that looks for leading + and - signs) to get the number of changed lines. Let me know if I can provide more specific pointers.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jelmer
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #597 on February 17, 2022 19:55.