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

Set --depth on git-fetch and make call to git-fetch optional #131

Merged
merged 4 commits into from
Dec 15, 2020

Conversation

stefanzweifel
Copy link
Owner

In this PR we're adding a new skip_fetch input option to disable the call to git-fetch. As reported in #130, calling git-fetch can have a negative impact on the performance of the Action in huge git repositories.

In addition, we added the --depth argument to git-fetch to not fetch the entire history of the repo, but only the last 3 commits.


Sidenote: The call to git-fetch has been added in #108 in relation to a problem reported in #106 with branch names like refactor/name. The / previously created problems.
By calling git fetch we've seemed to fix the error 🤷 Now that we have a test suite, it would probably make sense to switch to the proposed solution of using git switch (Will work on this in a separate PR)

This new option will allow users to skip the execution of `git fetch` if it has a negative impact in their workflows.

In a future PR I will probably remove the call to git-fetch interely. It was added in #108 in relation to a problem with slashes in branch names. That problem wasn't properly fixed though.
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

Successfully merging this pull request may close these issues.

1 participant