diff options
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sequencer.c b/sequencer.c index 6abd72160c..fb978a53a0 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1281,7 +1281,6 @@ void print_commit_summary(struct repository *r, struct strbuf author_ident = STRBUF_INIT; struct strbuf committer_ident = STRBUF_INIT; struct ref_store *refs; - int resolve_errno; commit = lookup_commit(r, oid); if (!commit) @@ -1332,12 +1331,9 @@ void print_commit_summary(struct repository *r, diff_setup_done(&rev.diffopt); refs = get_main_ref_store(the_repository); - head = refs_resolve_ref_unsafe(refs, "HEAD", 0, NULL, NULL, - &resolve_errno); - if (!head) { - errno = resolve_errno; - die_errno(_("unable to resolve HEAD after creating commit")); - } + head = refs_resolve_ref_unsafe(refs, "HEAD", 0, NULL, NULL); + if (!head) + die(_("unable to resolve HEAD after creating commit")); if (!strcmp(head, "HEAD")) head = _("detached HEAD"); else @@ -4223,8 +4219,11 @@ static int run_git_checkout(struct repository *r, struct replay_opts *opts, cmd.git_cmd = 1; - if (startup_info->original_cwd) + if (startup_info->original_cwd) { cmd.dir = startup_info->original_cwd; + strvec_pushf(&cmd.env_array, "%s=%s", + GIT_WORK_TREE_ENVIRONMENT, r->worktree); + } strvec_push(&cmd.args, "checkout"); strvec_push(&cmd.args, commit); strvec_pushf(&cmd.env_array, GIT_REFLOG_ACTION "=%s", action); |