Преглед изворни кода

Fix silent errors on subtree split

Willy-JL пре 1 година
родитељ
комит
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:
         ok = False
     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)
         result, status = git(
             "subtree",