diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2017-06-22 02:40:22 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-26 19:28:42 +0200 |
commit | dfdd4afcf97b0199f44231e726e373934da77717 (patch) | |
tree | 9f2bd74ea05128dd007e85930ebf863e337dbe5f /cache.h | |
parent | sha1_file: refactor read_object (diff) | |
download | git-dfdd4afcf97b0199f44231e726e373934da77717.tar.xz git-dfdd4afcf97b0199f44231e726e373934da77717.zip |
sha1_file: teach sha1_object_info_extended more flags
Improve sha1_object_info_extended() by supporting additional
flags. This allows has_sha1_file_with_flags() to be modified to use
sha1_object_info_extended() in a subsequent patch.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1863,6 +1863,10 @@ struct object_info { #define OBJECT_INFO_LOOKUP_REPLACE 1 /* Allow reading from a loose object file of unknown/bogus type */ #define OBJECT_INFO_ALLOW_UNKNOWN_TYPE 2 +/* Do not check cached storage */ +#define OBJECT_INFO_SKIP_CACHED 4 +/* Do not retry packed storage after checking packed and loose storage */ +#define OBJECT_INFO_QUICK 8 extern int sha1_object_info_extended(const unsigned char *, struct object_info *, unsigned flags); extern int packed_object_info(struct packed_git *pack, off_t offset, struct object_info *); |