Convert struct cache_tree to use struct object_id
Convert the sha1 member of struct cache_tree to struct object_id by changing the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct cache_tree E1; @@ - E1.sha1 + E1.oid.hash @@ struct cache_tree *E1; @@ - E1->sha1 + E1->oid.hash Fix up one reference to active_cache_tree which was not automatically caught by Coccinelle. These changes are prerequisites for converting parse_object. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
fb4e352b40
commit
e0a9280404
@ -1758,7 +1758,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
|
||||
append_merge_tag_headers(parents, &tail);
|
||||
}
|
||||
|
||||
if (commit_tree_extended(sb.buf, sb.len, active_cache_tree->sha1,
|
||||
if (commit_tree_extended(sb.buf, sb.len, active_cache_tree->oid.hash,
|
||||
parents, oid.hash, author_ident.buf, sign_commit, extra)) {
|
||||
rollback_index_files();
|
||||
die(_("failed to write commit object"));
|
||||
|
Reference in New Issue
Block a user