if (!sequencer_get_last_command(r, &action)) {
if (action == REPLAY_PICK && !state->cherry_pick_in_progress) {
state->cherry_pick_in_progress = 1;
- oidcpy(&state->cherry_pick_head_oid, null_oid(the_hash_algo));
+ oidcpy(&state->cherry_pick_head_oid, null_oid(r->hash_algo));
} else if (action == REPLAY_REVERT && !state->revert_in_progress) {
state->revert_in_progress = 1;
- oidcpy(&state->revert_head_oid, null_oid(the_hash_algo));
+ oidcpy(&state->revert_head_oid, null_oid(r->hash_algo));
}
}
if (get_detached_from)
* We have no head (or it's corrupt); use the empty tree,
* which will complain if the index is non-empty.
*/
- struct tree *tree = lookup_tree(r, the_hash_algo->empty_tree);
+ struct tree *tree = lookup_tree(r, r->hash_algo->empty_tree);
add_pending_object(&rev_info, &tree->object, "");
}