~edwargix/git.sr.ht

5fedffdf28a34d24c3b7ba44806dafb37ee05a23 — Drew DeVault 4 years ago 3ae9618
migration 3c1285bb23e2: drop check=True

Otherwise this will fail for invalid repos
1 files changed, 2 insertions(+), 4 deletions(-)

M gitsrht/alembic/versions/3c1285bb23e2_allow_deleting_default_branch.py
M gitsrht/alembic/versions/3c1285bb23e2_allow_deleting_default_branch.py => gitsrht/alembic/versions/3c1285bb23e2_allow_deleting_default_branch.py +2 -4
@@ 29,8 29,7 @@ def upgrade():
    print("Setting receive.denyDeleteCurrent=ignore")
    for repo in tqdm(session.query(Repository).all()):
        subprocess.run(["git", "config", "receive.denyDeleteCurrent", "ignore"],
            check=True, cwd=repo.path,
            stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
            cwd=repo.path, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)


def downgrade():


@@ 38,5 37,4 @@ def downgrade():
    session = Session(bind=bind)
    for repo in tqdm(session.query(Repository).all()):
        subprocess.run(["git", "config", "--unset", "receive.denyDeleteCurrent"],
            check=True, cwd=repo.path,
            stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
            cwd=repo.path, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)