]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sequencer.c
Merge branch 'pw/rebase-reflog-fixes'
[thirdparty/git.git] / sequencer.c
index a4d85f1fbdd4cbd12f590a1b400cb9939c903da0..e658df7e8ff66df9edc1e7d909f4688f5eea48c1 100644 (file)
@@ -915,7 +915,7 @@ int read_author_script(const char *path, char **name, char **email, char **date,
                error(_("missing 'GIT_AUTHOR_EMAIL'"));
        if (date_i == -2)
                error(_("missing 'GIT_AUTHOR_DATE'"));
-       if (date_i < 0 || email_i < 0 || date_i < 0 || err)
+       if (name_i < 0 || email_i < 0 || date_i < 0 || err)
                goto finish;
        *name = kv.items[name_i].util;
        *email = kv.items[email_i].util;
@@ -5050,6 +5050,8 @@ int sequencer_continue(struct repository *r, struct replay_opts *opts)
        if (read_populate_opts(opts))
                return -1;
        if (is_rebase_i(opts)) {
+               char *previous_reflog_action;
+
                if ((res = read_populate_todo(r, &todo_list, opts)))
                        goto release_todo_list;
 
@@ -5060,10 +5062,13 @@ int sequencer_continue(struct repository *r, struct replay_opts *opts)
                        unlink(rebase_path_dropped());
                }
 
+               previous_reflog_action = xstrdup(getenv(GIT_REFLOG_ACTION));
+               setenv(GIT_REFLOG_ACTION, reflog_message(opts, "continue", NULL), 1);
                if (commit_staged_changes(r, opts, &todo_list)) {
                        res = -1;
                        goto release_todo_list;
                }
+               setenv(GIT_REFLOG_ACTION, previous_reflog_action, 1);
        } else if (!file_exists(get_todo_path(opts)))
                return continue_single_pick(r, opts);
        else if ((res = read_populate_todo(r, &todo_list, opts)))