Merge branch 'jk/add-e-kill-editor' into maint
[gitweb.git] / builtin / add.c
index 3390933d68b2dd6c7296a7d2103d009fa27f2ca8..4bd98b799e7e1a46beb09249ab2299f4d2b335b8 100644 (file)
@@ -208,7 +208,8 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
        if (run_diff_files(&rev, 0))
                die(_("Could not write patch"));
 
-       launch_editor(file, NULL, NULL);
+       if (launch_editor(file, NULL, NULL))
+               die(_("editing patch failed"));
 
        if (stat(file, &st))
                die_errno(_("Could not stat '%s'"), file);