diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-11-12 21:28:54 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-13 13:20:44 +0900 |
commit | eb0ccfd7f5ce1765ada74abf272f002e1e34d1e4 (patch) | |
tree | 9042f094bd1f12d1249d714fdd177fcbe4fbf2a4 /sequencer.c | |
parent | Integrate hash algorithm support with repo setup (diff) | |
download | tgif-eb0ccfd7f5ce1765ada74abf272f002e1e34d1e4.tar.xz |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c index 6d027b06c8..2c191aeb36 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); |