diff --git a/aurweb/git/update.py b/aurweb/git/update.py index c9a98d0..3b9ff97 100755 --- a/aurweb/git/update.py +++ b/aurweb/git/update.py @@ -258,11 +258,14 @@ def main(): conn = aurweb.db.Connection() # Detect and deny non-fast-forwards. - if sha1_old != "0" * 40 and not privileged: + if sha1_old != "0" * 40: walker = repo.walk(sha1_old, pygit2.GIT_SORT_TOPOLOGICAL) walker.hide(sha1_new) if next(walker, None) is not None: - die("denying non-fast-forward (you should pull first)") + if privileged: + warn("non-fast-forward push (are you absolutely sure you mean this?)") + else: + die("denying non-fast-forward (you should pull first)") # Prepare the walker that validates new commits. walker = repo.walk(sha1_new, pygit2.GIT_SORT_TOPOLOGICAL)