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

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

Open
neopsyon opened this issue Nov 16, 2020 · 3 comments
Open

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

neopsyon opened this issue Nov 16, 2020 · 3 comments

Comments

@neopsyon
Copy link

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.

@maondrej
Copy link

maondrej commented Nov 23, 2020

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
`

@neopsyon
Copy link
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

@maondrej
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants