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

fix #233 error would clobber existing tag #234

Merged
merged 2 commits into from
Jan 15, 2019
Merged

Conversation

talset
Copy link
Contributor

@talset talset commented Jan 4, 2019

issue: #233

Update git fetch with -f

  -f, --force           force overwrite of local reference

ensure local refs are always the same as the upstream

Update git fetch with -f
  -f, --force           force overwrite of local reference

Signed-off-by: talset <talset55@gmail.com>
@vito
Copy link
Member

vito commented Jan 10, 2019

Thanks! Could a test be added for this? i.e. use local repo with tags as uri:, run check, update tag in repo, see that tag is updated during fetch?

@talset
Copy link
Contributor Author

talset commented Jan 15, 2019

@vito

Thanks! Could a test be added for this? i.e. use local repo with tags as uri:, run check, update tag in repo, see that tag is updated during fetch?

I added a new test function it_can_check_with_tag_filter_with_replaced_tags_from_cache who create a copy of the repo in order to use it as git-resource-repo-cache with an outdated version. It allow us to do a git fetch --tags from a remote origin.

Let me know if something need to be improved

test/check.sh Outdated
local ref3=$(make_commit_to_branch $repo branch-a)
local ref4=$(make_annotated_tag $repo "staging" "tag branch-a")

check_uri_with_tag_filter $cache_repo "staging" | jq -e "

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

In order to validate git fetch --tags we need to use a cached repo with
the source not updated in order to have a diff between the tag replaced.

Signed-off-by: talset <talset55@gmail.com>
@vito
Copy link
Member

vito commented Jan 15, 2019

awesome, thanks a bunch!

@vito vito merged commit b1db5e5 into concourse:master Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants