rev-parse --parseopt: allow [*=?!] in argument hints
[gitweb.git] / builtin / add.c
index ee370b059adfd106c70e2c4aa4df50663cb4a8ec..4bd98b799e7e1a46beb09249ab2299f4d2b335b8 100644 (file)
@@ -63,7 +63,6 @@ static void update_callback(struct diff_queue_struct *q,
                switch (fix_unmerged_status(p, data)) {
                default:
                        die(_("unexpected diff status %c"), p->status);
-               case DIFF_STATUS_ADDED:
                case DIFF_STATUS_MODIFIED:
                case DIFF_STATUS_TYPE_CHANGED:
                        if (add_file_to_index(&the_index, path, data->flags)) {
@@ -209,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);