Skip to content

Commit

Permalink
Show bootstrap commit when asking to confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Jan 24, 2024
1 parent 0c53530 commit d6a4851
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gitbark/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

import click
import logging
import subprocess
import sys
import os

Expand All @@ -61,6 +62,7 @@ def ensure_bootstrap_verified(project: Project) -> None:
"WARNING! The previously trusted bootstrap commit has CHANGED!"
)
else:
subprocess.run(["git", "show", "--stat", root_hash])
click.echo(
f"The bootstrap commit ({root_hash}) of the bark_rules "
"branch has not been verified!"
Expand Down
2 changes: 2 additions & 0 deletions gitbark/commands/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import click
import os
import subprocess
import yaml

ACTIVE_BRANCH = "active_branch"
Expand Down Expand Up @@ -237,6 +238,7 @@ def add_branches_interactive(project: Project, branch: str) -> None:
click.echo(f"Configure how the '{branch}' branch should be validated!\n")

bootstrap = project.repo.resolve(branch)[0].hash.hex()
subprocess.run(["git", "show", "--stat", bootstrap])
if not click.confirm(
f"Do you want to verify the '{branch}' branch using "
f"commit {bootstrap} as bootstrap?"
Expand Down

0 comments on commit d6a4851

Please sign in to comment.