mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't add head ref if head red matches desired ref
This commit is contained in:
parent
e7540e956b
commit
a9c0cacb77
1 changed files with 1 additions and 1 deletions
|
@ -703,7 +703,7 @@ class Pygit2(GitProvider):
|
|||
# ref doesn't exist will raise an exception in pygit2 >= 0.21),
|
||||
# and create the HEAD ref if it is missing.
|
||||
head_ref = self.repo.lookup_reference('HEAD').target
|
||||
if head_ref not in refs:
|
||||
if head_ref not in refs and head_ref != local_ref:
|
||||
branch_name = head_ref.partition('refs/heads/')[-1]
|
||||
if not branch_name:
|
||||
# Shouldn't happen, but log an error if it does
|
||||
|
|
Loading…
Add table
Reference in a new issue