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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/check
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fi

if [ -d $destination ]; then
cd $destination
git fetch $tagflag
git fetch $tagflag -f
git reset --hard FETCH_HEAD
else
branchflag=""
Expand Down
19 changes: 19 additions & 0 deletions test/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,24 @@ it_can_check_with_tag_filter_with_bogus_ref() {
"
}

it_can_check_with_tag_filter_with_replaced_tags() {

local repo=$(init_repo)
local ref1=$(make_commit_to_branch $repo branch-a)
local ref2=$(make_annotated_tag $repo "staging" "tag branch-a")
# see that the tag is initially ref1
check_uri_with_tag_filter $repo "staging" | jq -e "
. == [{ref: \"staging\", commit: \"$ref1\"}]
"

local ref3=$(make_commit_to_branch $repo branch-a)
local ref4=$(make_annotated_tag $repo "staging" "tag branch-a")

check_uri_with_tag_filter $repo "staging" | jq -e "
. == [{ref: \"staging\", commit: \"$ref3\"}]
"
}

it_can_check_and_set_git_config() {
local repo=$(init_repo)
local ref=$(make_commit $repo)
Expand Down Expand Up @@ -554,6 +572,7 @@ run it_can_check_with_tag_filter_with_cursor
run it_can_check_with_tag_filter_over_all_branches
run it_can_check_with_tag_filter_over_all_branches_with_cursor
run it_can_check_with_tag_filter_with_bogus_ref
run it_can_check_with_tag_filter_with_replaced_tags
run it_can_check_from_head_only_fetching_single_branch
run it_can_check_and_set_git_config
run it_can_check_from_a_ref_and_only_show_merge_commit
Expand Down