If you clone a repo from Drupal it comes with Windows line endings. But when you run through CU its parser/writer routines use Linux line endings, so your file ends up with a mix. See this file here:

Notice all the line endings are LF until the end of the Implements hook_field_extra_fields(). comment, when it switches to CR. This happens for all the Implements hook_wwwww(). lines. It may be this is the only write routine thats messed up since I haven't seen any other problems like this. If you convert the file to Linux line endings first, this doesnt happen.
If you clone a repo from Drupal it comes with Windows line endings. But when you run through CU its parser/writer routines use Linux line endings, so your file ends up with a mix. See this file here:

Notice all the line endings are
LFuntil the end of theImplements hook_field_extra_fields().comment, when it switches toCR. This happens for all theImplements hook_wwwww().lines. It may be this is the only write routine thats messed up since I haven't seen any other problems like this. If you convert the file to Linux line endings first, this doesnt happen.