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

Equality operators #4680

Merged
merged 2 commits into from Mar 20, 2018
Merged

Conversation

drewnoakes
Copy link
Member

Changes proposed in this pull request:

  • Use equality operator for comparing strings and types

The code used Equals in some places and == in others when comparing strings.

This PR makes all code use == for regular string comparison.

This doesn't effect perf but it does make the code more readable and consistent. This is C#, not Java!

What did I do to test the code and ensure quality:

  • Manual review of automated refactoring
  • Unit tests
  • Manual testing

Has been tested on:

  • GIT 2.16
  • Windows 10

@codecov
Copy link

codecov bot commented Mar 20, 2018

Codecov Report

Merging #4680 into master will not change coverage.
The diff coverage is 6.38%.

@@           Coverage Diff           @@
##           master    #4680   +/-   ##
=======================================
  Coverage   27.55%   27.55%           
=======================================
  Files         506      506           
  Lines       41008    41008           
  Branches     5967     5967           
=======================================
  Hits        11298    11298           
  Misses      29201    29201           
  Partials      509      509
Impacted Files Coverage Δ
GitCommands/Settings/AppSettings.cs 26.77% <ø> (ø) ⬆️
GitUI/UserControls/PathFormatter.cs 0% <0%> (ø) ⬆️
GitCommands/Config/ConfigFile.cs 80.36% <0%> (ø) ⬆️
...mmandsDialogs/RepoHosting/DiscussionHtmlCreator.cs 0% <0%> (ø) ⬆️
...tingsDialog/Pages/GitConfigAdvancedSettingsPage.cs 38.46% <0%> (ø) ⬆️
...BrowseDialog/DashboardControl/DashboardCategory.cs 17.75% <0%> (ø) ⬆️
...rols/RevisionGridClasses/GitRefListsForRevision.cs 0% <0%> (ø) ⬆️
...mmandsDialogs/RepoHosting/CreatePullRequestForm.cs 13.23% <0%> (ø) ⬆️
ResourceManager/Translator.cs 28.2% <0%> (ø) ⬆️
GitUI/CommandsDialogs/FormCheckoutBranch.cs 19.85% <0%> (ø) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a01c280...339763b. Read the comment docs.

@RussKie RussKie merged commit 29cfde6 into gitextensions:master Mar 20, 2018
@RussKie RussKie added this to the 3.00 milestone Mar 20, 2018
@drewnoakes drewnoakes deleted the equality-operators branch March 21, 2018 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants