Despite git step description states that "this step is shorthand for the generic SCM step", it behaves differently when specifying commit hash as a branch to checkout. Consider the following pipeline:
Though the stages should be identical according to docs, the second stage fails:
However if branch is set to "master" - it works just fine.
So, it looks like git step follows a completely different path from what the checkout step does. Either git step's description or, preferably, its behaviour needs to be changed.
PS I vaguely recall that at some point the stages worked identical indeed but now it's definitely not so.
|Field||Original Value||New Value|
|Assignee||Mark Waite [ markewaite ]|
|Remote Link||This issue links to "PR-297 Document limitations of git step (Web Link)" [ 24024 ]|
|Summary||Shorthand git step doesn't handle commit hashes||Pipeline git step doesn't handle commit hashes|
|Resolution||Fixed [ 1 ]|
|Status||Open [ 1 ]||Fixed but Unreleased [ 10203 ]|
|Summary||Pipeline git step doesn't handle commit hashes||Document that Pipeline git step doesn't handle commit hashes|
|Released As||git plugin 4.1.0|
|Status||Fixed but Unreleased [ 10203 ]||Closed [ 6 ]|