Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yysun committed Feb 12, 2013
2 parents 5b2f9de + 2cc9538 commit ed84ecc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions GitApi/GitFileStatusTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,13 @@ public string DiffFile(string fileName)
df.Flush();
}
}

// normalize the line endings of the diff so VS doesn't ask to do it for us
string text = File.ReadAllText(tmpFileName).Replace("\r\n", "\n").Replace('\r', '\n');
// normalize to Environment.NewLine since this is only used for display in the IDE
// and we want users to be able to copy from the diff and paste in a document without
// changing line endings
File.WriteAllText(tmpFileName, text.Replace("\n", Environment.NewLine));
}
catch (Exception ex)
{
Expand Down

0 comments on commit ed84ecc

Please sign in to comment.