mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #29681 from clinta/git-mirror
fix bare/mirror in git.latest
This commit is contained in:
commit
3c427e82bf
1 changed files with 3 additions and 2 deletions
|
@ -104,7 +104,7 @@ def _uptodate(ret, target, comments=None):
|
|||
# Shouldn't be making any changes if the repo was up to date, but
|
||||
# report on them so we are alerted to potential problems with our
|
||||
# logic.
|
||||
ret['comment'] += '\n\nChanges made: ' + comments
|
||||
ret['comment'] += '\n\nChanges made: ' + str(comments)
|
||||
return ret
|
||||
|
||||
|
||||
|
@ -475,6 +475,7 @@ def latest(name,
|
|||
|
||||
if bare:
|
||||
remote_rev = None
|
||||
remote_rev_type = None
|
||||
else:
|
||||
if rev == 'HEAD':
|
||||
if 'HEAD' in all_remote_refs:
|
||||
|
@ -555,7 +556,7 @@ def latest(name,
|
|||
all_local_tags = __salt__['git.list_tags'](target, user=user)
|
||||
local_rev, local_branch = _get_local_rev_and_branch(target, user)
|
||||
|
||||
if remote_rev is None and local_rev is not None:
|
||||
if not bare and remote_rev is None and local_rev is not None:
|
||||
return _fail(
|
||||
ret,
|
||||
'Remote repository is empty, cannot update from a '
|
||||
|
|
Loading…
Add table
Reference in a new issue