^ and $ in this regex are matching start and end of string, not start and end of line.  And the final character is either \r or \n, but not both.  C Git might produce a \r if this is a continuation progress message with more messages coming, or \n if this is the final message.  But it doesn't produce both over the network.