You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/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
3 years ago
..
testdata/academic-module Fix panic when diff (#9187) 5 years ago
csv.go Add Tabular Diff for CSV files (#14661) 3 years ago
csv_test.go Fixed assert statements. (#16089) 3 years ago
gitdiff.go Use git attributes to determine generated and vendored status for language stats and diffs (#16773) 3 years ago
gitdiff_test.go Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) 3 years ago
main_test.go Move git diff codes from models to services/gitdiff (#7889) 5 years ago