mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-16 12:55:09 +03:00
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
|
@ -83,3 +83,10 @@ def test_print_checks_git_repo(args, monkeypatch, tmpdir):
|
|||
run_git(["pull"])
|
||||
status, _ = func(args, name_repo)
|
||||
assert status == 0
|
||||
|
||||
# Outdated remote information
|
||||
def is_outdated(args, path):
|
||||
return True
|
||||
monkeypatch.setattr(pmb.helpers.git, "is_outdated", is_outdated)
|
||||
status, _ = func(args, name_repo)
|
||||
assert status == -5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue