Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 7f76c47

Browse files
committed
Pass hint path to CreateBlob.
So that git knows the file type and can do line-ending conversion.
1 parent 2c9958a commit 7f76c47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.App/Services/GitClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public Task<ContentChanges> CompareWithString(IRepository repository, string sha
206206
{
207207
var contentStream = new MemoryStream(Encoding.UTF8.GetBytes(contents));
208208
var blob1 = commit[path]?.Target as Blob ?? repository.ObjectDatabase.CreateBlob(new MemoryStream());
209-
var blob2 = repository.ObjectDatabase.CreateBlob(contentStream);
209+
var blob2 = repository.ObjectDatabase.CreateBlob(contentStream, path);
210210
return repository.Diff.Compare(blob1, blob2);
211211
}
212212

0 commit comments

Comments
 (0)