Skip to content

Commit

Permalink
Use fully qualified ref names to avoid ambiguity between branches and…
Browse files Browse the repository at this point in the history
… tags with the same name
  • Loading branch information
WilliamWFLee committed Oct 3, 2024
1 parent a16341f commit 6a7d003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/epi_deploy/git_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def create_or_update_tag(name, commit = nil, push: true)
git.add_tag(name, commit, annotate: true, f: true, message: name)

if push
git.push('origin', name)
git.push('origin', "refs/tags/#{name}")
end
end

Expand Down Expand Up @@ -93,7 +93,7 @@ def git
end

def force_create_branch(name, commit)
run_custom_command("git branch -f #{name} #{commit}")
run_custom_command("git branch -f refs/heads/#{name} #{commit}")
end

def local_branches(branch_names = [])
Expand Down

0 comments on commit 6a7d003

Please sign in to comment.