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

Preparations for exceptions on git error (part 4 of 4) #9336

Merged
merged 3 commits into from Jul 10, 2021

Conversation

mstv
Copy link
Member

@mstv mstv commented Jul 4, 2021

Some of the preparations for #9056 contributed by @gerhardol

Proposed changes

  • GetMergedBranchesAsync: Ignore (git exit code and) StandardError
  • GetRemotesAsync: Return empty list on non-zero git exit code
  • GetRefs: Return empty list on non-zero git exit code

I am not really convinced that we should swallow errors from these commands. That's why:

  • Add TODOs for later generic handling of StandardError

Screenshots

not affected

Test methodology

  • NUnit tests
  • manual

Test environment(s)

  • Git Extensions 33.33.33
  • Build e6c851c
  • Git 2.31.1.windows.1
  • Microsoft Windows NT 10.0.19042.0
  • .NET 5.0.7
  • DPI 96dpi (no scaling)

✒️ I contribute this code under The Developer Certificate of Origin.

@mstv mstv self-assigned this Jul 4, 2021
@mstv mstv marked this pull request as draft July 4, 2021 22:43
@mstv
Copy link
Member Author

mstv commented Jul 8, 2021

I have added TODOs for a later generic handling of StandardError in a follow-up.

@mstv mstv marked this pull request as ready for review July 8, 2021 20:59
GitCommands/Git/GitModule.cs Outdated Show resolved Hide resolved
GitCommands/Git/GitModule.cs Outdated Show resolved Hide resolved
GitCommands/Git/GitModule.cs Outdated Show resolved Hide resolved
Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

👍

@mstv mstv force-pushed the fix/6527_git_errors_prep4 branch from 0b30df5 to 09d5975 Compare July 10, 2021 22:43
@mstv mstv merged commit bbc0f2e into gitextensions:master Jul 10, 2021
@ghost ghost added this to the 3.6 milestone Jul 10, 2021
@mstv mstv deleted the fix/6527_git_errors_prep4 branch July 10, 2021 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants