GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update to use modern version of LibGit2Sharp and use indent heuristic when diffing by jcansdale · Pull Request #2142 · github/VisualStudio

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

Conversation

@jcansdale

@jcansdale jcansdale commented Dec 18, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Depends on:

  • Target net46 instead of net461 libgit2/libgit2sharp#1651: Target net46 instead of net461
  • Add support for git diff --indent-heuristic option libgit2/libgit2sharp#1652: Add support for git diff --indent-heuristic option

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 Pull Request inline comment appears on GitHub.com but not in extension #1469 appears.

Fixes #1469
Fixes #2144

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jcansdale added 4 commits December 18, 2018 10:54
@jcansdale
Update to be compatible with LigGit2Sharp 0.26
e8d9527
Stop using obsolete LigGit2Sharp methods.
Also changed from using Task.Factory.StartNew to Task.Run.
@jcansdale
Fix tests that use LibGit2Sharp
4658122
@jcansdale
Merge branch 'master' into fixes/1469-indent-heuristic
b0c037b
@jcansdale
Remove obsolete IQueryableCommitLog.QueryBy imple
8b6a488
@jcansdale
jcansdale force-pushed the fixes/1469-indent-heuristic branch 2 times, most recently from 28c2bc7 to 26f5e2d Compare December 19, 2018 10:30
@jcansdale jcansdale mentioned this pull request Dec 19, 2018
Unable to add or reply to comments #2144
Closed
jcansdale added 3 commits January 8, 2019 12:20
@jcansdale
Update to use LibGit2Sharp 0.26.0-preview-0080
32c4aac
Reference LibGit2Sharp that targets .NET 4.6
@jcansdale
Commit[] no longer accepts \ in path
bbc0504
Pass gitHubFilePath not winFilePath to FakeDiffService.Diff.
@jcansdale
Remove unused defaultOriginName field
128cfbe
@jcansdale
jcansdale force-pushed the fixes/1469-indent-heuristic branch from f28091a to 128cfbe Compare January 8, 2019 12:24
jcansdale added 10 commits January 8, 2019 14:44
@jcansdale
Enable IndentHeuristic when comparing
057844a
@jcansdale
Move Compare and CompareWith to IGitService
62ccc9b
IGitService knows about IRepository but not remote servers. IGitClient
knows about remote git repositories. IGitService  is a more appropriate
home for Compare and CompareWith.
@jcansdale
Add failing Indent_Heuristic_Is_Enabled test
e6ebab6
@jcansdale
Add tests for GitService.CompareWith
e0eb92c
@jcansdale
Enable IndentHeuristic and make tests pass
c222de2
@jcansdale
Move IGitClient.Compare method to IGitService
d95149d
@jcansdale
Add test for Compare that returns TreeChanges
df677af
@jcansdale
Merge branch 'master' into fixes/1469-indent-heuristic
ca6de27
@jcansdale
Add failing test for GitService.Compare
b348527
There is a bug where a renamed file is in a directory.
@jcansdale
Change to use / separator for Git path
cc43965
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 added 8 commits January 9, 2019 16:59
@jcansdale
Merge branch 'master' into fixes/1469-indent-heuristic
7362f56
@jcansdale
Throw ArgumentException if path contains \
f685a22
Check that path doesn't contain \ rather than automatically convert to
use /.
@jcansdale
Factor out Guard.ArgumentIsGitPath
346bfe1
@jcansdale
Add Guard.ArgumentIsGitPath to appropriate methods
7d87a40
@jcansdale
Fix issue where a Windows path is being used
7006897
Make private ExtractToTempFile method accept Git path.
@jcansdale
Add guards to HasChangesInWorkingDirectory
8c5d1f7
@jcansdale
Merge branch 'master' into fixes/1469-indent-heuristic
6fa16e8
@jcansdale
Updatre to use LibGit2Sharp 0.26.0 final
f9c9cce
@jcansdale
jcansdale requested review from StanleyGoldman and meaghanlewis March 19, 2019 11:13
@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
@jcansdale jcansdale added the Ready for Review label Mar 19, 2019
@jcansdale
Merge branch 'master' into fixes/1469-indent-heuristic
f14b646
StanleyGoldman
StanleyGoldman reviewed Mar 25, 2019
View reviewed changes
Comment thread src/GitHub.App/Services/GitClient.cs
#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 StanleyGoldman Mar 25, 2019

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@StanleyGoldman
StanleyGoldman self-requested a review March 26, 2019 11:43
StanleyGoldman
StanleyGoldman approved these changes Mar 26, 2019
View reviewed changes
@StanleyGoldman
StanleyGoldman merged commit 0c2a3df into master Mar 26, 2019
@StanleyGoldman
StanleyGoldman deleted the fixes/1469-indent-heuristic branch March 26, 2019 12:29
@jcansdale jcansdale mentioned this pull request Jun 13, 2019
Be consistent about how we use relative paths and Git paths #2386
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@meaghanlewis meaghanlewis Awaiting requested review from meaghanlewis
1 more reviewer
@StanleyGoldman StanleyGoldman StanleyGoldman approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Ready for Review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jcansdale @StanleyGoldman
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.