| Name | 
 Last commit 
 | 
Last update | 
|---|---|---|
| .. | ||
| network | ||
| test | ||
| .gitignore | ||
| CMakeLists.txt | ||
| COPYING | ||
| Makefile | ||
| README.md | ||
| add.c | ||
| blame.c | ||
| cat-file.c | ||
| common.c | ||
| common.h | ||
| diff.c | ||
| general.c | ||
| init.c | ||
| log.c | ||
| rev-list.c | ||
| rev-parse.c | ||
| showindex.c | ||
| status.c | ||
| tag.c | 
This takes the `--stat` and related example options in the example diff.c program and converts them to use the `git_diff_get_stats` API which nicely formats stats for you. I went to add bar-graph scaling to the stats formatter and noticed that the `git_diff_stats` structure was holding on to all of the `git_patch` objects. Unfortunately, each of these objects keeps the full text of the diff in memory, so this is very expensive. I ended up modifying `git_diff_stats` to keep just the data that it needs to keep and allowed it to release the patches. Then, I added width scaling to the output on top of that. In making the diff example program match 'git diff' output, I ended up removing an newline from the sumamry output which I then had to compensate for in the email formatting to match the expectations. Lastly, I went through and refactored the tests to use a couple of helper functions and reduce the overall amount of code there.
| Name | 
 Last commit 
 | 
Last update | 
|---|---|---|
| .. | ||
| network | Loading commit data... | |
| test | Loading commit data... | |
| .gitignore | Loading commit data... | |
| CMakeLists.txt | Loading commit data... | |
| COPYING | Loading commit data... | |
| Makefile | Loading commit data... | |
| README.md | Loading commit data... | |
| add.c | Loading commit data... | |
| blame.c | Loading commit data... | |
| cat-file.c | Loading commit data... | |
| common.c | Loading commit data... | |
| common.h | Loading commit data... | |
| diff.c | Loading commit data... | |
| general.c | Loading commit data... | |
| init.c | Loading commit data... | |
| log.c | Loading commit data... | |
| rev-list.c | Loading commit data... | |
| rev-parse.c | Loading commit data... | |
| showindex.c | Loading commit data... | |
| status.c | Loading commit data... | |
| tag.c | Loading commit data... |