Closed nils-a closed 2 years ago
@gitfool would you be in a position to take this for a spin? I'm not entirely convinced I implemented git fetch --tags
correctly..
@nils-a not really; TeamCity is a distant memory. You could probably check your implementation against actions/checkout?
@augustoproiete , @nils-a I'm wondering if there should be 2 GitFetch methods instead of a single one with a GitFetchSettings parameter. GHA checkout executes the following commands (for a tag):
"C:\Program Files\Git\bin\git.exe" init D:\a\testbed-actions\testbed-actions
"C:\Program Files\Git\bin\git.exe" remote add origin https://github.com/Wyam2/testbed-actions
"C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
"C:\Program Files\Git\bin\git.exe" tag --list v1.0.0-rc4
"C:\Program Files\Git\bin\git.exe" rev-parse refs/tags/v1.0.0-rc4
"C:\Program Files\Git\bin\git.exe" -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules origin +9dd0ba78f0c7fa15015418b45812e551e11f91cd:refs/tags/v1.0.0-rc4
(see here)
As it currently is, it not possible to pass --prune
. Or to fetch submodules.
Thanks, Simo
@savornicesei I've added an overload that takes a GitFetchSettings
object for more complex scenarios. This will enable setting prune
during the fetch option. However, I was unable to find examples on how to fetch submodules. Any hints are welcome.
Added GitFetch for a simple fetch and GitFetchTags where TagFetchMode is set to All.
fixes #1