mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Clarify that for pygit2, receiving 0 objects means repo is up-to-date
This seems to be too confusing to users, so this changes the log message to say that the repo is up-to-date instead of saying that 0 objects were received.
This commit is contained in:
parent
98885f71d6
commit
8f1c0084cd
1 changed files with 10 additions and 4 deletions
|
@ -1169,10 +1169,16 @@ def update():
|
|||
# pygit2.Remote.fetch() returns a class instance in
|
||||
# pygit2 >= 0.21.0
|
||||
received_objects = fetch.received_objects
|
||||
log.debug(
|
||||
'gitfs received {0} objects for remote {1}'
|
||||
.format(received_objects, repo['url'])
|
||||
)
|
||||
if received_objects != 0:
|
||||
log.debug(
|
||||
'gitfs received {0} objects for remote {1}'
|
||||
.format(received_objects, repo['url'])
|
||||
)
|
||||
else:
|
||||
log.debug(
|
||||
'gitfs remote {0} is up-to-date'
|
||||
.format(repo['url'])
|
||||
)
|
||||
# Clean up any stale refs
|
||||
refs_post = repo['repo'].listall_references()
|
||||
cleaned = _clean_stale(repo['repo'], refs_post)
|
||||
|
|
Loading…
Add table
Reference in a new issue