The Wayback Machine - https://web.archive.org/web/20201215051604/https://github.com/github/VisualStudio/pull/2142
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

  • Check that inline comment from #1469 appears.

Fixes #1469
Fixes #2144

jcansdale added 4 commits Dec 18, 2018
Stop using obsolete LigGit2Sharp methods.
Also changed from using Task.Factory.StartNew to Task.Run.
@jcansdale jcansdale force-pushed the fixes/1469-indent-heuristic branch 2 times, most recently from 28c2bc7 to 26f5e2d Dec 18, 2018
jcansdale added 3 commits Dec 18, 2018
Reference LibGit2Sharp 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 Jan 8, 2019
jcansdale added 10 commits Jan 8, 2019
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 Jan 9, 2019
jcansdale added 8 commits Jan 9, 2019
Check that path doesn't contain \ rather than automatically convert to
use /.
Make private ExtractToTempFile method accept Git path.
@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);

This comment has been minimized.

@StanleyGoldman

StanleyGoldman Mar 25, 2019
Contributor

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

@StanleyGoldman StanleyGoldman self-requested a review Mar 26, 2019
@StanleyGoldman StanleyGoldman merged commit 0c2a3df into master Mar 26, 2019
3 checks passed
3 checks passed
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
github.VisualStudio Build #20190322.3 succeeded
Details
@StanleyGoldman StanleyGoldman deleted the fixes/1469-indent-heuristic branch Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.