Skip to content

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

Merged
stefanzweifel merged 4 commits intomasterfrom
git-fetch-depth
Dec 15, 2020
Merged

Set --depth on git-fetch and make call to git-fetch optional#131
stefanzweifel merged 4 commits intomasterfrom
git-fetch-depth

Conversation

@stefanzweifel
Copy link
Copy Markdown
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