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

Use static/cached GitVersion to resolve Git path #9246

Merged
3 commits merged into from Jun 2, 2021

Conversation

gerhardol
Copy link
Member

Part of #9229

Proposed changes

  • Reset GitVersion cache when setting Git command path
    Report new GitVersion after changes

  • Use static/cached GitVersion to resolve Git path
    This eliminates one git --version command during startup. At home this is about 35ms, at work 230ms (probably serialized, so delaying the startup considerably).

Test methodology

Tests exist
Manual
See Git Command Log for executed command, modify gitcommand path in registry to simulate issues


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

@ghost ghost assigned gerhardol May 30, 2021
@gerhardol gerhardol mentioned this pull request May 30, 2021
10 tasks
@@ -336,6 +336,7 @@ public static string GitCommandValue
}
set
{
GitVersion.ResetVersion();
Copy link
Member

Choose a reason for hiding this comment

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

Only if value has changed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I considered that, but wanted to keep it simple.
It is not the end of the world to run the command again....
Can change

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

👍

GitUI/CommandsDialogs/SettingsDialog/CheckSettingsLogic.cs Outdated Show resolved Hide resolved
@gerhardol
Copy link
Member Author

@msftbot merge in 24 hours

@ghost ghost added the status: auto merge label Jun 1, 2021
@ghost
Copy link

ghost commented Jun 1, 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 Wed, 02 Jun 2021 09:29:19 GMT, which is in 1 day

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

@ghost ghost merged commit fa7fd3a into gitextensions:master Jun 2, 2021
@ghost ghost added this to the 3.6 milestone Jun 2, 2021
@gerhardol gerhardol deleted the feature/i9229-git-version branch June 2, 2021 21:52
@gerhardol
Copy link
Member Author

Missed to squash the commit, automerge should fail...

@RussKie
Copy link
Member

RussKie commented Jun 2, 2021 via email

This pull request was closed.
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

4 participants