Merge branch 'nd/the-index' into md/list-objects-filter-by-depth
[gitweb.git] / builtin / am.c
index dc576a33728f5c2264acf66fcbe3243284144781..95370313b66daad8cabcc3b855136e29afb3133f 100644 (file)
@@ -1970,7 +1970,7 @@ static int clean_index(const struct object_id *head, const struct object_id *rem
        if (merge_tree(remote_tree))
                return -1;
 
-       remove_branch_state();
+       remove_branch_state(the_repository);
 
        return 0;
 }
@@ -1981,7 +1981,7 @@ static int clean_index(const struct object_id *head, const struct object_id *rem
 static void am_rerere_clear(void)
 {
        struct string_list merge_rr = STRING_LIST_INIT_DUP;
-       rerere_clear(&merge_rr);
+       rerere_clear(the_repository, &merge_rr);
        string_list_clear(&merge_rr, 1);
 }
 
@@ -2113,7 +2113,9 @@ static int parse_opt_patchformat(const struct option *opt, const char *arg, int
 {
        int *opt_value = opt->value;
 
-       if (!strcmp(arg, "mbox"))
+       if (unset)
+               *opt_value = PATCH_FORMAT_UNKNOWN;
+       else if (!strcmp(arg, "mbox"))
                *opt_value = PATCH_FORMAT_MBOX;
        else if (!strcmp(arg, "stgit"))
                *opt_value = PATCH_FORMAT_STGIT;