8000 Update to use modern version of LibGit2Sharp and use indent heuristic when diffing by jcansdale · Pull Request #2142 · github/VisualStudio · GitHub
[go: up one dir, main page]

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

Update to use modern version of LibGit2Sharp and use indent heuristic when diffing #2142

Merged
merged 26 commits into from
Mar 26, 2019

Conversation

jcansdale
Copy link
Collaborator
@jcansdale jcansdale commented Dec 18, 2018

Depends on:

Thanks @bording for the fast turnaround of the net46 PR! 🙏

What this PR does

  • Update to reference LibGit2Sharp 0.26.0
  • Stop using obsolete LibGit2Sharp methods
  • Fix broken test caused by Commit and Tree no longer accepting \ in paths
  • Enable indent heuristic when comparing files
  • Move Compare and CompareWith from IGitClient to IGitService (comparing files doesn't require the credentials of GitClient)
  • Add tests for Compare and CompareWith methods of GitClient

To do

  • Rebase and reference LibGit2Sharp 0.26.* from NuGet (not local version)
  • Enable the indent heuristic when diffing
  • Previously is was possible to use \ as a separator when looking up Tree entries. We should maybe add checks for this in case we're using \ instead of / anywhere.

How to test

Fixes #1469
Fixes #2144

@jcansdale jcansdale force-pushed the fixes/1469-indent-heuristic branch 2 times, most recently from 28c2bc7 to 26f5e2d Compare December 19, 2018 10:30
Reference LibG
10000
it2Sharp that targets .NET 4.6
Pass gitHubFilePath not winFilePath to FakeDiffService.Diff.
@jcansdale jcansdale force-pushed the fixes/1469-indent-heuristic branch from f28091a to 128cfbe Compare January 8, 2019 12:24
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.
@jcansdale jcansdale force-pushed the fixes/1469-indent-heuristic branch from bbffa93 to cc43965 Compare January 9, 2019 13:25
@jcansdale jcansdale changed the title [wip] Update to use modern version of LibGit2Sharp and use indent heuristic when diffing Update to use modern version of LibGit2Sharp and use indent heuristic when diffing Mar 19, 2019
#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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess things have changed since this warning was disabled...

@StanleyGoldman StanleyGoldman self-requested a review March 26, 2019 11:43
@StanleyGoldman StanleyGoldman merged commit 0c2a3df into master Mar 26, 2019
@StanleyGoldman StanleyGoldman deleted the fixes/1469-indent-heuristic branch March 26, 2019 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0