diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-06 14:45:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-06 14:45:44 -0700 |
commit | 8429f2b42d04a0598079c847c39d45d777613939 (patch) | |
tree | 5c4c3954173955e4cbaf1551b6757512caf324fa /tree.c | |
parent | 89d3eafe9019b407d6b2cf8913c6845bde50b178 (diff) | |
parent | b6aec868afb17acdbd486c09602a658e14c98602 (diff) | |
download | git-8429f2b42d04a0598079c847c39d45d777613939.tar.gz |
Merge branch 'bc/object-id'
Move from unsigned char[20] to struct object_id continues.
* bc/object-id:
match-trees: convert several leaf functions to use struct object_id
tree-walk: convert tree_entry_extract() to use struct object_id
struct name_entry: use struct object_id instead of unsigned char sha1[20]
match-trees: convert shift_tree() and shift_tree_by() to use object_id
test-match-trees: convert to use struct object_id
sha1-name: introduce a get_oid() function
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -76,7 +76,7 @@ static int read_tree_1(struct tree *tree, struct strbuf *base, continue; } - switch (fn(entry.sha1, base, + switch (fn(entry.oid->hash, base, entry.path, entry.mode, stage, context)) { case 0: continue; @@ -87,19 +87,19 @@ static int read_tree_1(struct tree *tree, struct strbuf *base, } if (S_ISDIR(entry.mode)) - hashcpy(sha1, entry.sha1); + hashcpy(sha1, entry.oid->hash); else if (S_ISGITLINK(entry.mode)) { struct commit *commit; - commit = lookup_commit(entry.sha1); + commit = lookup_commit(entry.oid->hash); if (!commit) die("Commit %s in submodule path %s%s not found", - sha1_to_hex(entry.sha1), + oid_to_hex(entry.oid), base->buf, entry.path); if (parse_commit(commit)) die("Invalid commit %s in submodule path %s%s", - sha1_to_hex(entry.sha1), + oid_to_hex(entry.oid), base->buf, entry.path); hashcpy(sha1, commit->tree->object.oid.hash); |