Merge branch 'tk/interpret-trailers-in-place'
[gitweb.git] / builtin / am.c
index f1a25ab6ad881fc903a533595792b1a46b40ea91..de235cf11a9df925f482d02ec0df7c6e748ff35d 100644 (file)
@@ -1441,7 +1441,7 @@ static void get_commit_info(struct am_state *state, struct commit *commit)
        assert(!state->msg);
        msg = strstr(buffer, "\n\n");
        if (!msg)
-               die(_("unable to parse commit %s"), sha1_to_hex(commit->object.sha1));
+               die(_("unable to parse commit %s"), oid_to_hex(&commit->object.oid));
        state->msg = xstrdup(msg + 2);
        state->msg_len = strlen(state->msg);
 }
@@ -1939,6 +1939,7 @@ static void am_run(struct am_state *state, int resume)
         */
        if (!state->rebasing) {
                am_destroy(state);
+               close_all_packs();
                run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
        }
 }