git status check - linux and darwin
This commit is contained in:
parent
965155ee60
commit
ae2bc020eb
|
@ -1,5 +1,4 @@
|
|||
import argparse
|
||||
from sys import platform
|
||||
|
||||
from models import * # set ONNX_EXPORT in models.py
|
||||
from utils.datasets import *
|
||||
|
|
|
@ -5,6 +5,7 @@ import random
|
|||
import shutil
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from sys import platform
|
||||
|
||||
import cv2
|
||||
import matplotlib
|
||||
|
@ -33,6 +34,7 @@ def init_seeds(seed=0):
|
|||
|
||||
|
||||
def check_git_status():
|
||||
if platform in ['linux', 'darwin']:
|
||||
# Suggest 'git pull' if repo is out of date
|
||||
s = subprocess.check_output('if [ -d .git ]; then git fetch && git status -uno; fi', shell=True).decode('utf-8')
|
||||
if 'Your branch is behind' in s:
|
||||
|
|
Loading…
Reference in New Issue