aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/obs/lib/git.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/obs/lib/git.py b/scripts/obs/lib/git.py
index 67f1d5e..29c183b 100644
--- a/scripts/obs/lib/git.py
+++ b/scripts/obs/lib/git.py
@@ -28,10 +28,10 @@ def clone(project, fetch=False):
if os.path.exists(repo_path):
if fetch:
- print(f"{project}: cloning {url} (cached, fetching)")
+ print(f"{project}: 'git fetch'")
lib.run_cmd(["git", "fetch"], cwd=repo_path)
else:
- print(f"{project}: cloning {url} (cached, not fetching)")
+ print(f"{project}: using cached {url} (not cloning, not fetching)")
return
print(f"{project}: cloning {url}")
@@ -46,13 +46,15 @@ def clone(project, fetch=False):
def clean(project):
repo_path = get_repo_path(project)
+ print(f"{project}: 'git clean -ffxd'")
lib.run_cmd(["git", "clean", "-ffxd"], cwd=repo_path)
def checkout(project, branch):
repo_path = get_repo_path(project)
- print(f"{project}: checking out {branch}")
+ print(f"{project}: 'git checkout -f {branch}'")
lib.run_cmd(["git", "checkout", "-f", branch], cwd=repo_path)
+ print(f"{project}: 'git reset --hard {branch}'")
lib.run_cmd(["git", "reset", "--hard", branch], cwd=repo_path)