]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/am.c
hook.[ch]: move find_hook() from run-command.c to hook.c
[thirdparty/git.git] / builtin / am.c
index ff7dd33fcd46f1a0e32e0ea934124eb73ff4430f..3527945a46726560d21f36e3fff271f85d97420c 100644 (file)
@@ -11,6 +11,7 @@
 #include "parse-options.h"
 #include "dir.h"
 #include "run-command.h"
+#include "hook.h"
 #include "quote.h"
 #include "tempfile.h"
 #include "lockfile.h"
@@ -1848,7 +1849,6 @@ next:
         */
        if (!state->rebasing) {
                am_destroy(state);
-               close_object_store(the_repository->objects);
                run_auto_maintenance(state->quiet);
        }
 }
@@ -2106,7 +2106,8 @@ static void am_abort(struct am_state *state)
        if (!has_orig_head)
                oidcpy(&orig_head, the_hash_algo->empty_tree);
 
-       clean_index(&curr_head, &orig_head);
+       if (clean_index(&curr_head, &orig_head))
+               die(_("failed to clean index"));
 
        if (has_orig_head)
                update_ref("am --abort", "HEAD", &orig_head,