We used to have this logic in three places: - repo_pull_request.html - _repo_renderdiff.html - pagure.api.forks.py
This is now all in pagure.lib.git and exposed in the template via the patch_stats jinja filter.
patch_stats
Fixes https://pagure.io/pagure/issue/3868
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr
243 lines added, 302 removed, I was almost expected a bigger difference :)
rebased onto 78c6bc720f8a0bce0b614661118c679f24c505a0
rebased onto 60a246a69705f6060e62d45e56ccb096db1989f8
rebased onto b700cec8be0ba06ec7b6e2f2057e161e3475986a
rebased onto 30195dca1722552f8fbb31f044ca80fa8e4a22dc
rebased onto 77187788f5f647f66f6f065abab64ab5d3b23cae
rebased onto 7acbbc963a2c6888ddaf2750be65790db53998e9
rebased onto aa9244483658b98a3d12fed6d06786f6a481107a
you could directly call patch.line_stats[1] here and same for linesremoved. but that's a nitpick
patch.line_stats[1]
linesremoved
Big :thumbsup:
True, there is no need for these variables :)
rebased onto f6a6e0caa6de76a3dbfb8ffcbf4bc312c368d3ea
Thanks for the review :)
Pull-Request has been merged by pingou
We used to have this logic in three places:
- repo_pull_request.html
- _repo_renderdiff.html
- pagure.api.forks.py
This is now all in pagure.lib.git and exposed in the template via the
patch_statsjinja filter.Fixes https://pagure.io/pagure/issue/3868
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr