-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Feature request for retrieve multiple branches tips with --depth 1 #329
Comments
The token is persisted by default, so I think this will work: steps:
- uses: actions/checkout@v2
- run: git fetch --depth=1 Hope that helps, let me know. |
I am encountering a similar problem. I am not sure how to apply the solution by eric. git remote set-branches origin '*'
git fetch --depth 1
git checkout SOME_OTHER_BRANCH |
I'd just like to report that the @ericsciple's workaround works fine, and it allowed me to do eslint and jest only against changed files 🎉 eslint: jest:
|
I'm also interested in this, but for computing coverage. To compute coverage of a PR, we need to detect modified lines relative to the default branch (e.g. So, I need to fetch both the PR's branch, and the default branch, but I don't need all the commits, IIUC. Maybe having an option like |
I need to checkout developing branch and then compare changes with the
master
branch.By default
actions/checkout@v2
fetches only one branch, and the only option to fetch multiple branches is to usefetch-depth: '0'
, which retrieves all history for all branches and tags, wasting time and traffic.With git my issue is solving as
clone --depth 1 --no-single-branch --branch developing <uri>
So next pipeline can operate with
git diff origin/master
Is there a way to retrieve all (or some) branch tips without retrieving the whole history with this GHA?
The text was updated successfully, but these errors were encountered: