struct name_entry: use struct object_id instead of unsigned char sha1[20]
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
82db3d44e7
commit
7d924c9139
10
tree.c
10
tree.c
@ -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);
|
||||
|
Reference in New Issue
Block a user