##// END OF EJS Templates
use `git status` to check if it's a repo...
MinRK -
Show More
@@ -38,7 +38,16 b' def ipython_submodules(root):'
38
38
39 def is_repo(d):
39 def is_repo(d):
40 """is d a git repo?"""
40 """is d a git repo?"""
41 return os.path.exists(pjoin(d, '.git'))
41 if not os.path.exists(pjoin(d, '.git')):
42 return False
43 proc = subprocess.Popen('git status',
44 stdout=subprocess.PIPE,
45 stderr=subprocess.PIPE,
46 shell=True,
47 cwd=d,
48 )
49 status, _ = proc.communicate()
50 return status == 0
42
51
43 def check_submodule_status(root=None):
52 def check_submodule_status(root=None):
44 """check submodule status
53 """check submodule status
General Comments 0
You need to be logged in to leave comments. Login now