Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Update to use modern version of LibGit2Sharp and use indent heuristic when diffing #2142
Conversation
Stop using obsolete LigGit2Sharp methods. Also changed from using Task.Factory.StartNew to Task.Run.
28c2bc7
to
26f5e2d
Reference LibGit2Sharp that targets .NET 4.6
Pass gitHubFilePath not winFilePath to FakeDiffService.Diff.
IGitService knows about IRepository but not remote servers. IGitClient knows about remote git repositories. IGitService is a more appropriate home for Compare and CompareWith.
There is a bug where a renamed file is in a directory.
The new version of LibGit2Sharp expects / separators in Git paths. The previous version wasn't fussy.
Check that path doesn't contain \ rather than automatically convert to use /.
Make private ExtractToTempFile method accept Git path.
| #pragma warning disable 0618 // TODO: Replace `Network.Fetch` with `Commands.Fetch`. | ||
| repository.Network.Fetch(remote, fetchOptions); | ||
| #pragma warning restore 0618 | ||
| repository.Network.Fetch(remoteName, new[] { "+refs/heads/*:refs/remotes/origin/*" }, fetchOptions); |
StanleyGoldman
Mar 25, 2019
Contributor
I guess things have changed since this warning was disabled...
I guess things have changed since this warning was disabled...


Depends on:
Thanks @bording for the fast turnaround of the🙏
net46PR!What this PR does
0.26.0LibGit2SharpmethodsCommitandTreeno longer accepting\in pathsCompareandCompareWithfromIGitClienttoIGitService(comparing files doesn't require the credentials ofGitClient)CompareandCompareWithmethods ofGitClientTo do
LibGit2Sharp 0.26.*from NuGet (not local version)\as a separator when looking upTreeentries. We should maybe add checks for this in case we're using\instead of/anywhere.How to test
Fixes #1469
Fixes #2144