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

Log RevisionReader parse errors #9359

Merged

Conversation

gerhardol
Copy link
Member

Followup to #9354 #9243

Proposed changes

  • A few minor optimizations, mostly using in parameters (likely not noticeable)
    The log parsing is probably the most important code to optimize for opening a repo.

  • Log parse errors (with limitations)

Before #9243 parse errors had to be ignored as the input data was incorrectly split for FileHistory.
In #9354 the parsing failed (introduced in #9243), only seen in DEBUG though.

If there are other parse errors (likely existing from before, not much of the actual parsing logging has been changed), the visibility is improved by Debug.Assert the first occurrence and Trace.Assert the first 10 errors. Printouts include the commit sha if available.
This will notify DEBUG users and give a way for production users to provide information, but avoid that the log or popups overwhelming the user.

Also removed the trace printout about time to parse the log information.

Note: TRACE is set by default in GE.

Note 2: Debug.Assert seem to abort execution in master, not giving the popup to allow continuing as before (.NET5 or BugReporter?)

Test methodology

Manual


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

@ghost ghost assigned gerhardol Jul 10, 2021
GitCommands/RevisionReader.cs Outdated Show resolved Hide resolved
@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Jul 11, 2021
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Jul 11, 2021
GitCommands/RevisionReader.cs Outdated Show resolved Hide resolved
GitCommands/RevisionReader.cs Outdated Show resolved Hide resolved
@crypto-rsa
Copy link
Contributor

Hmm, I just noticed an issue which is probably related to this. In the history form for any file, the very first commit (where the file was added) is displayed incorrectly - the subject is replaced by the author e-mail. The commit info box is correct, though.

obrazek

@crypto-rsa
Copy link
Contributor

The history issue is indeed fixed by the latest fixup.

@gerhardol gerhardol force-pushed the feature/i9354-parse-log-error branch from 83fe92b to e87419d Compare July 13, 2021 20:29
@gerhardol
Copy link
Member Author

The history issue is indeed fixed by the latest fixup.

That was a regression in master, since gitext://gotocommit/c8396d8d94e06c8c24d23bad33554c92a2754fad

@gerhardol gerhardol force-pushed the feature/i9354-parse-log-error branch from e87419d to a6a9831 Compare July 13, 2021 20:51
@gerhardol
Copy link
Member Author

@msftbot merge in 3 days

@ghost ghost added the status: auto merge label Jul 13, 2021
@ghost
Copy link

ghost commented Jul 13, 2021

Hello @gerhardol!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Fri, 16 Jul 2021 20:52:52 GMT, which is in 3 days

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@gerhardol gerhardol force-pushed the feature/i9354-parse-log-error branch from a6a9831 to 0524cbc Compare July 16, 2021 14:45
@gerhardol gerhardol merged commit 87c6a72 into gitextensions:master Jul 16, 2021
@ghost ghost added this to the 3.6 milestone Jul 16, 2021
@gerhardol gerhardol deleted the feature/i9354-parse-log-error branch July 16, 2021 15:05
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

5 participants