0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-29 23:06:19 +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_test.go Fixed assert statements. (#16089) 2021-06-07 07:27:09 +02:00
csv.go Add Tabular Diff for CSV files (#14661) 2021-03-29 22:44:28 +02:00
gitdiff_test.go Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) 2021-08-31 06:16:23 +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
main_test.go