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

Allow fetch-depth to fetch tags within that depth #448

Closed
Christewart opened this issue Feb 22, 2021 · 3 comments · Fixed by #579
Closed

Allow fetch-depth to fetch tags within that depth #448

Christewart opened this issue Feb 22, 2021 · 3 comments · Fixed by #579

Comments

@Christewart
Copy link

I'm using github actions to push docker images to dockerhub and require tags to make sure my artifacts version is correct.

I'm using fetch-depth: 500 to avoid really long fetch times with my repo (yes, I know this is a problem on it's own).

I would expected the default behavior of the action is to checkout tags within that 500 depth limit, not use --no-tags

 /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=500 origin +cd1e2e1b5d307b7f4a2c6e49113da14cfc7b1c36:refs/remotes/origin/master

is the command that gets run

https://github.com/bitcoin-s/bitcoin-s/runs/1947728258#step:2:40

@freddyrios
Copy link

Got hit by this and I don't get why no-tags is used in the first place.

Local testing shows:

  1. removing the no-tags only fetches the tags within the depth limit specified.
  2. the default of 1 commit still only pulls 1 commit (in line with the above)

Can't see the downside, just some extra metadata being pulled?

@hairyhenderson
Copy link

I'm also seeing this behaviour with fetch-depth: 0, which contradicts what the docs say... Maybe something broke since #258?

/cc @ericsciple

@RobertWieczoreck
Copy link
Contributor

I forged a pull request that fixes this issue by introducing a fetch-tags option: #579
Reviews and thumbs-ups are very welcome :)

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 a pull request may close this issue.

4 participants