pack-objects: use object_id in packlist_alloc()
[gitweb.git] / builtin / am.c
index 252e37ddf08e45eceb98628fe598df3ebcafb1fd..ee7305eaa663ae434b44ed567661b5fd81dbe817 100644 (file)
@@ -1272,7 +1272,9 @@ static void get_commit_info(struct am_state *state, struct commit *commit)
        buffer = logmsg_reencode(commit, NULL, get_commit_output_encoding());
 
        ident_line = find_commit_header(buffer, "author", &ident_len);
-
+       if (!ident_line)
+               die(_("missing author line in commit %s"),
+                     oid_to_hex(&commit->object.oid));
        if (split_ident_line(&id, ident_line, ident_len) < 0)
                die(_("invalid ident line: %.*s"), (int)ident_len, ident_line);
 
@@ -1956,7 +1958,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(the_repository);
+       remove_branch_state(the_repository, 0);
 
        return 0;
 }