Skip to content

Please state the difference between fetch-depth and fetch_depth #1411

Answered by jackton1
jackton1 asked this question in Q&A
Discussion options

You must be logged in to vote

The distinction between the fetch-depth passed to the checkout action and the fetch_depth used by tj-actions/changed-files is as follows:

checkout action

This action checks-out your repository under $GITHUB_WORKSPACE, so the tj-actions/changed-files workflow can access it.

  • fetch-depth: Indicates the number of commits to fetch.
    • 0: Represents all history for all branches and tags.
    • 1: Represents the current commit HEAD
    • 2: Represents the current commit and its parent HEAD^1

tj-actions/changed-files

Uses either the local git repository or Github's REST API to check for changes that have occurred to files.

  • fetch_depth: Controls the number of additional commits that should be pulled when a…

Replies: 1 comment 2 replies

Comment options

jackton1
Jul 25, 2023
Maintainer Author

You must be logged in to vote
2 replies
@rick-kenna
Comment options

@jackton1
Comment options

jackton1 Jul 25, 2023
Maintainer Author

Answer selected by jackton1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants