summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-01 02:28:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-02 01:46:41 (GMT)
commite0a92804044a4025fc8abbfa1d92fd16f6f2e1f4 (patch)
tree43f7723d39de8b7b83d977c16be5ef82697f04e8 /sequencer.c
parentfb4e352b4082a447c089151b1f2662844bda0354 (diff)
downloadgit-e0a92804044a4025fc8abbfa1d92fd16f6f2e1f4.zip
git-e0a92804044a4025fc8abbfa1d92fd16f6f2e1f4.tar.gz
git-e0a92804044a4025fc8abbfa1d92fd16f6f2e1f4.tar.bz2
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 10c3b4f..b0f862b 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -508,7 +508,8 @@ static int is_index_unchanged(void)
if (cache_tree_update(&the_index, 0))
return error(_("unable to update cache tree\n"));
- return !hashcmp(active_cache_tree->sha1, head_commit->tree->object.oid.hash);
+ return !oidcmp(&active_cache_tree->oid,
+ &head_commit->tree->object.oid);
}
static int write_author_script(const char *message)