summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2013-12-11 07:46:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-12 19:53:48 (GMT)
commitbf93eea0f67082ec295ac60fa78986f339adf2c6 (patch)
tree8fafdbbbae96efdc2136cbeb10e517ba19fbd91a /cache.h
parent500a04f196d90ef3a426ff63f76b44df479efc7d (diff)
downloadgit-bf93eea0f67082ec295ac60fa78986f339adf2c6.zip
git-bf93eea0f67082ec295ac60fa78986f339adf2c6.tar.gz
git-bf93eea0f67082ec295ac60fa78986f339adf2c6.tar.bz2
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 873a6b5..1086071 100644
--- a/cache.h
+++ b/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 *);