diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-12-10 12:36:13 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-12-10 12:36:13 -0800 |
commit | 844a9ce47208de173341525c15a4c8c689dd278e (patch) | |
tree | d771915b28609179ddf1f3f911bcb30b7019d7cf /sha1_file.c | |
parent | Merge branch 'dt/fsck-verify-pack-error' (diff) | |
parent | remote: convert functions to struct object_id (diff) | |
download | tgif-844a9ce47208de173341525c15a4c8c689dd278e.tar.xz |
Merge branch 'bc/object-id'
More transition from "unsigned char[40]" to "struct object_id".
This needed a few merge fixups, but is mostly disentangled from other
topics.
* bc/object-id:
remote: convert functions to struct object_id
Remove get_object_hash.
Convert struct object to object_id
Add several uses of get_object_hash.
object: introduce get_object_hash macro.
ref_newer: convert to use struct object_id
push_refs_with_export: convert to struct object_id
get_remote_heads: convert to struct object_id
parse_fetch: convert to use struct object_id
add_sought_entry_mem: convert to struct object_id
Convert struct ref to use object_id.
sha1_file: introduce has_object_file helper.
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c index 3d56746a9b..27ce7b705e 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -3216,6 +3216,11 @@ int has_sha1_file_with_flags(const unsigned char *sha1, int flags) return find_pack_entry(sha1, &e); } +int has_object_file(const struct object_id *oid) +{ + return has_sha1_file(oid->hash); +} + static void check_tree(const void *buf, size_t size) { struct tree_desc desc; |