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
var patches = repo0.Diff.Compare<Patch>(commit1?.Tree, commit2.Tree, Enumerable.Repeat(change.Path, 1), compareOptions: compareOptions);
Getting patches + applying them to file does not seems to work if there are unicode characters in file itself.
Have tried to save it in utf8, but problem still persists.
As a walkaround to this problem, I have added extra comparison that there aren't any unicode characters.
// If we have some unicode characters, then cannot be handled as text diff.
canBeHandledAsTextPatch = strpatches.All(c => c <= 255);
But, libgit itself has built in support for patching, See https://libgit2.org/libgit2/#HEAD, git_apply* function calls - but none of these operations seems to be supported in libgit2sharp.
The text was updated successfully, but these errors were encountered:
Getting patches + applying them to file does not seems to work if there are unicode characters in file itself.
Have tried to save it in utf8, but problem still persists.
As a walkaround to this problem, I have added extra comparison that there aren't any unicode characters.
But, libgit itself has built in support for patching, See https://libgit2.org/libgit2/#HEAD,
git_apply*
function calls - but none of these operations seems to be supported inlibgit2sharp
.The text was updated successfully, but these errors were encountered: