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 2) #9231

Merged
merged 3 commits into from May 24, 2021

Conversation

mstv
Copy link
Member

@mstv mstv commented May 23, 2021

Some of the preparations for #9056 contributed by @gerhardol

Proposed changes

  • Suppress git warning for safecrlf
    occured if:
    • core.safecrlf is warn or true
    • core.autocrlf is true on Windows
    • a file stored in crlf is edited to lf
    • File is selected in Diff tab
  • Let git filter for merge commits instead with own regex
  • Avoid git error in Left Panel
    occurred when the ROT is initialized in the Dashboard without a working dir, of course

Screenshots

not affected

Test methodology

  • NUnit tests
  • manual

Test environment(s)

  • Git Extensions 0.0.0.0
  • Build b430c3f
  • Git 2.31.1.windows.1
  • Microsoft Windows NT 10.0.19042.0
  • .NET 5.0.6
  • DPI 96dpi (no scaling)

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

gerhardol and others added 3 commits May 23, 2021 23:20
Occurs if:
* core.safecrlf is warn or true
* core.autocrlf is true on Windows
* a file stored in crlf is edited to lf
* File is selected in Diff tab
when init in Dashboard - without working dir, of course
@mstv mstv self-assigned this May 23, 2021
@@ -1116,19 +1116,11 @@ public bool ExistsMergeCommit(string? startRev, string? endRev)
{
"--parents",
"--no-walk",
"--min-parents=2",
Copy link
Member

Choose a reason for hiding this comment

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

This option is available in Git 2.1 at least (but maybe not when the command was originally added?), so no version check required

@mstv mstv merged commit aeb7392 into gitextensions:master May 24, 2021
@ghost ghost added this to the 3.6 milestone May 24, 2021
@mstv mstv deleted the fix/6527_git_errors_prep2 branch May 24, 2021 09:38
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

3 participants