mirror of
https://github.com/bluekeyes/go-gitdiff
synced 2026-06-08 13:18:30 +00:00
Improve fragment validation, track context lines
Track leading and trailing context lines because it's easy and Git includes this information in the fragment type. Add validation for when the fragment does not agree with the header or with the new/deleted state of the file.
This commit is contained in:
@@ -39,6 +39,9 @@ type Fragment struct {
|
||||
LinesAdded int64
|
||||
LinesDeleted int64
|
||||
|
||||
LeadingContext int64
|
||||
TrailingContext int64
|
||||
|
||||
Lines []FragmentLine
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user