Fix git safe directory
This commit is contained in:
@@ -19,6 +19,8 @@ class WOGit:
|
|||||||
for path in paths:
|
for path in paths:
|
||||||
global git
|
global git
|
||||||
wogit = git.bake("-C", "{0}".format(path))
|
wogit = git.bake("-C", "{0}".format(path))
|
||||||
|
wogitsafe = git.bake("--global --add safe.directory",
|
||||||
|
"{0}".format(path))
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
if not os.path.isdir(path + "/.git"):
|
if not os.path.isdir(path + "/.git"):
|
||||||
try:
|
try:
|
||||||
@@ -29,6 +31,7 @@ class WOGit:
|
|||||||
Log.debug(self, "{0}".format(e))
|
Log.debug(self, "{0}".format(e))
|
||||||
Log.error(self, "Unable to git init at {0}"
|
Log.error(self, "Unable to git init at {0}"
|
||||||
.format(path))
|
.format(path))
|
||||||
|
wogitsafe
|
||||||
status = wogit.status("-s")
|
status = wogit.status("-s")
|
||||||
if len(status.splitlines()) > 0:
|
if len(status.splitlines()) > 0:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user