Unverified 提交 3a72d4a7 authored 作者: Glenn Jocher's avatar Glenn Jocher 提交者: GitHub

Update `check_git_status()` warning (#4610)

上级 35fe0314
...@@ -162,8 +162,7 @@ def check_git_status(): ...@@ -162,8 +162,7 @@ def check_git_status():
branch = check_output('git rev-parse --abbrev-ref HEAD', shell=True).decode().strip() # checked out branch = check_output('git rev-parse --abbrev-ref HEAD', shell=True).decode().strip() # checked out
n = int(check_output(f'git rev-list {branch}..origin/master --count', shell=True)) # commits behind n = int(check_output(f'git rev-list {branch}..origin/master --count', shell=True)) # commits behind
if n > 0: if n > 0:
s = f"⚠️ WARNING: code is out of date by {n} commit{'s' * (n > 1)}. " \ s = f"⚠️ YOLOv5 is out of date by {n} commit{'s' * (n > 1)}. Use `git pull` or `git clone {url}` to update."
f"Use 'git pull' to update or 'git clone {url}' to download latest."
else: else:
s = f'up to date with {url} ✅' s = f'up to date with {url} ✅'
print(emojis(s)) # emoji-safe print(emojis(s)) # emoji-safe
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论