sha1_file.c: add lookup_replace_object_extended() to pass flags
Currently, there is only one caller to lookup_replace_object() that can benefit from passing it some flags, but we expect that there could be more. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
500a04f196
commit
bf93eea0f6
6
cache.h
6
cache.h
@ -773,6 +773,12 @@ static inline const unsigned char *lookup_replace_object(const unsigned char *sh
|
||||
return sha1;
|
||||
return do_lookup_replace_object(sha1);
|
||||
}
|
||||
static inline const unsigned char *lookup_replace_object_extended(const unsigned char *sha1, unsigned flag)
|
||||
{
|
||||
if (!(flag & LOOKUP_REPLACE_OBJECT))
|
||||
return sha1;
|
||||
return lookup_replace_object(sha1);
|
||||
}
|
||||
|
||||
/* Read and unpack a sha1 file into memory, write memory to a sha1 file */
|
||||
extern int sha1_object_info(const unsigned char *, unsigned long *);
|
||||
|
||||
Reference in New Issue
Block a user