Skip to content

Conversation

@hyabean
Copy link
Contributor

@hyabean hyabean commented Dec 28, 2021

Description

Fixes #2927

Related Issue

#2927

Motivation and Context

Invalid use of Lazy leads the fix of #2933 doesn't work properly. this.versionContext.Value will always be null. This problem was bypassed by way of early access in unit test.
if replace

        bool isCurrentCommitTagged = this.versionContext.IsValueCreated &&
            this.versionContext.Value.IsCurrentCommitTagged;

with
bool isCurrentCommitTagged = context.IsCurrentCommitTagged;,
will cause many other unit tests failed.
So I have to move the if statement into the NormalizeGitDirectory method.

How Has This Been Tested?

Tested the reproduce case in #2927.
all unit tests passed

Screenshots (if appropriate):

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@hyabean hyabean closed this Dec 28, 2021
@hyabean hyabean deleted the fix-2927 branch December 28, 2021 09:56
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.

[Bug]Failed to try and guess branch to use. Move one of the branches along a commit to remove warning

1 participant