Skip to content

Invoke-Git : warning: refname 'x' is ambiguous. #128

Open

Description

@neopsyon

Hello,

We're utilizing the BuildHelpers along with https://github.com/psake/PowerShellBuild module.
Environment: Azure Pipelines
Lately, we're seeing that multiple pipelines are failing due to the error message Invoke-Git : warning: refname 'x' is ambiguous.
The error seems to appear randomly, and if the same build is re-run multiple times, sometimes it passes over the error.

Activity

  1. maondrej commented on Nov 23, 2020

    @maondrej

    Hello,

    just ran it into the same case today.

    VERBOSE: Invoking PSdepend...
    D:\a\1\s\Build\build.ps1 : UNEXPECTED ERROR:
    warning: refname '224ef3228331ebc4acf2303e6a1f82728227b095' is ambiguous.
    t C:\Users\Vss
    dministrator\Documents\WindowsPowerShell\Modules\BuildHelpers\2.0.15\Public\Get-BuildVariable.ps1:189 char:17

    • ... Invoke-Git @IGParams -
      rguments "log --format=%B -n 1 $( ...
    •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-Git
      

    At D:\a_temp\69904975-11fd-4279-a0e4-b008df7a9665.ps1:3 char:1
    `

  2. neopsyon commented on Nov 24, 2020

    @neopsyon
    Author

    Hello @maondrej
    This is how I made the workaround, but definitely, it's some kind of anomaly under the hood.
    In my build or publish task, for example, I added the following command before the execution of the Module related commands.
    git config advice.objectNameWarning false

  3. maondrej commented on Dec 23, 2020

    @maondrej

    Hello @nemanja-jovic,

    the issue is probably caused by Azure Pipeline agent since version v2.177.1. I can confirm workaround mentioned in thread to set the following variable at the top of CI/CD yaml

    variables: 'VSTS.DisableFetchByCommit': 'true'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions