You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a patch is malformed or a File is created directly, various fields may disagree. Add a validate function that checks for these types of issues so clients (e.g. appliers) can rely on the content of the fields.
Some of the issues to check:
IsRename is true/false but OldName and NewName are equal/not equal
IsDelete or IsNew is true but there is more than one fragment
IsDelete is true but the single fragment has context or addition lines or NewPosition and NewLines are not 0
IsNew is true but the single fragment has context or deletion lines or OldPosition and OldLines are not 0
IsBinary is true but TextFragments is not empty
The text was updated successfully, but these errors were encountered:
If a patch is malformed or a
File
is created directly, various fields may disagree. Add a validate function that checks for these types of issues so clients (e.g. appliers) can rely on the content of the fields.Some of the issues to check:
IsRename
is true/false butOldName
andNewName
are equal/not equalIsDelete
orIsNew
is true but there is more than one fragmentIsDelete
is true but the single fragment has context or addition lines orNewPosition
andNewLines
are not 0IsNew
is true but the single fragment has context or deletion lines orOldPosition
andOldLines
are not 0IsBinary
is true butTextFragments
is not emptyThe text was updated successfully, but these errors were encountered: