summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-11-12 21:28:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-13 04:20:44 (GMT)
commiteb0ccfd7f5ce1765ada74abf272f002e1e34d1e4 (patch)
tree9042f094bd1f12d1249d714fdd177fcbe4fbf2a4 /sequencer.c
parent78a6766802ef32b82e6062e8e6ac5621894cc4a2 (diff)
downloadgit-eb0ccfd7f5ce1765ada74abf272f002e1e34d1e4.zip
git-eb0ccfd7f5ce1765ada74abf272f002e1e34d1e4.tar.gz
git-eb0ccfd7f5ce1765ada74abf272f002e1e34d1e4.tar.bz2
Switch empty tree and blob lookups to use hash abstraction
Switch the uses of empty_tree_oid and empty_blob_oid to use the current_hash abstraction that represents the current hash algorithm in use. 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c
index 6d027b0..2c191ae 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -347,7 +347,7 @@ static int read_oneliner(struct strbuf *buf,
static struct tree *empty_tree(void)
{
- return lookup_tree(&empty_tree_oid);
+ return lookup_tree(the_hash_algo->empty_tree);
}
static int error_dirty_index(struct replay_opts *opts)
@@ -705,7 +705,7 @@ static int is_original_commit_empty(struct commit *commit)
oid_to_hex(&parent->object.oid));
ptree_oid = &parent->tree->object.oid;
} else {
- ptree_oid = &empty_tree_oid; /* commit is root */
+ ptree_oid = the_hash_algo->empty_tree; /* commit is root */
}
return !oidcmp(ptree_oid, &commit->tree->object.oid);
@@ -958,7 +958,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
} else {
unborn = get_oid("HEAD", &head);
if (unborn)
- oidcpy(&head, &empty_tree_oid);
+ oidcpy(&head, the_hash_algo->empty_tree);
if (index_differs_from(unborn ? EMPTY_TREE_SHA1_HEX : "HEAD",
NULL, 0))
return error_dirty_index(opts);