-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix git ref to allow branches and tags (#3095)
This changes the git ref input to align with the git notion of a ref as a tag or branch. We now always try to fetch a given ref before falling back to fetching the HEAD to resolve partial refs. If both a ref and branch are provided, the branch is fetched directly before resolving the ref. The inputs `tag` and `commit` can still be used but can now be replaced by setting the `ref`. For example: - Branch `ref=main` will fetch and checkout the `main` branch - Tag `ref=v1.0.0` will fetch and checkout the `v1.0.0` tag - Partial `ref=123456` will fetch `HEAD` and checkout `123456` - Branch with partial `ref=123456,branch=feature` will fetch `feature` and checkout `123456` - Commit `ref=<sha>` will fetch `<sha>` and checkout `<sha>` - Branch with commit `ref=<sha>,branch=feature` with fetch `feature` and checkout `<sha>` Fixes #2932
- Loading branch information
1 parent
eee05d1
commit 8c22e90
Showing
3 changed files
with
127 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters