diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-13 21:28:54 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-13 21:28:54 (GMT) |
commit | 721cc4314cb593e799213ad5f926a1e9fc5779b0 (patch) | |
tree | ffa71b39724a9eed8dc7c653cafb4e1211e7820d /sequencer.c | |
parent | 95ec6b1b3393eb6e26da40c565520a8db9796e9f (diff) | |
parent | c250e02e2c6de8c116f4320a48ce44bbdb43015c (diff) | |
download | git-721cc4314cb593e799213ad5f926a1e9fc5779b0.zip git-721cc4314cb593e799213ad5f926a1e9fc5779b0.tar.gz git-721cc4314cb593e799213ad5f926a1e9fc5779b0.tar.bz2 |
Merge branch 'bc/hash-algo'
An infrastructure to define what hash function is used in Git is
introduced, and an effort to plumb that throughout various
codepaths has been started.
* bc/hash-algo:
repository: fix a sparse 'using integer as NULL pointer' warning
Switch empty tree and blob lookups to use hash abstraction
Integrate hash algorithm support with repo setup
Add structure representing hash algorithm
setup: expose enumerated repo info
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 fa94ed6..e90bc31 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) @@ -706,7 +706,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); @@ -959,7 +959,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); |