Просмотр исходного кода

Fix silent errors on subtree split

Willy-JL 1 год назад
Родитель
Сommit
3bf86e8f06
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      .subtrees/common.py

+ 5 - 1
.subtrees/common.py

@@ -135,7 +135,11 @@ def subdir_split_helper(path, repo, branch, subdir, action, cached=None):
     if "fatal: " in result:
     if "fatal: " in result:
         ok = False
         ok = False
     git("checkout", prevbranch)
     git("checkout", prevbranch)
-    if ok:
+    if not ok:
+        print(f"Something went wrong with {path}/.gitsubtree, check above")
+        send_alert("Subtree merge failed", "Something went wrong, check logs")
+        sys.exit(1)
+    else:
         prevhead = git("rev-parse", "HEAD", pipe=True)
         prevhead = git("rev-parse", "HEAD", pipe=True)
         result, status = git(
         result, status = git(
             "subtree",
             "subtree",