0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-18 16:01:36 +01:00
gitea/services/gitdiff
zeripath 248b96d8a3
Use git attributes to determine generated and vendored status for language stats and diffs (#16773)
Replaces #16262
Replaces #16250
Replaces #14833

This PR first implements a `git check-attr` pipe reader - using `git check-attr --stdin -z --cached` - taking account of the change in the output format in git 1.8.5 and creates a helper function to read a tree into a temporary index file for that pipe reader.

It then wires this in to the language stats helper and into the git diff generation.

Files which are marked generated will be folded by default.

Fixes #14786
Fixes #12653
2021-09-09 21:13:36 +01:00
..
testdata/academic-module Fix panic when diff (#9187) 2019-11-28 17:05:57 +08:00
csv.go Add Tabular Diff for CSV files (#14661) 2021-03-29 22:44:28 +02:00
csv_test.go Fixed assert statements. (#16089) 2021-06-07 07:27:09 +02:00
gitdiff.go Use git attributes to determine generated and vendored status for language stats and diffs (#16773) 2021-09-09 21:13:36 +01:00
gitdiff_test.go Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) 2021-08-31 06:16:23 +02:00
main_test.go Move git diff codes from models to services/gitdiff (#7889) 2019-09-05 22:20:09 -04:00