forked from Mirror/pmbootstrap
pmbootstrap status: check if git repo is outdated (!1882)
Use the timestamp of .git/FETCH_HEAD in each git repository, to determine if too much time has passed since the last fetch/pull. Modify pmb.helpers.git.clone, so FETCH_HEAD is always created if it does not exist (because "git clone" would not create it). Related: #1829
This commit is contained in:
parent
c8526f2fcb
commit
cfd93bc6ea
5 changed files with 79 additions and 13 deletions
|
@ -91,6 +91,12 @@ def print_checks_git_repo(args, repo, details=True):
|
|||
"update with 'pmbootstrap pull'")
|
||||
log_ok("up to date with remote branch")
|
||||
|
||||
# Outdated remote information
|
||||
if pmb.helpers.git.is_outdated(args, path):
|
||||
return log_nok_ret(-5, "outdated remote information",
|
||||
"update with 'pmbootstrap pull'")
|
||||
log_ok("remote information updated recently (via git fetch/pull)")
|
||||
|
||||
return (0, "")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue