summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2013-12-11 07:46:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-12 19:53:48 (GMT)
commitde7b5d6218e4b928c5a395e34e5e1de40fae2a0d (patch)
tree6473995f18b338fa7278a44f2a4348fecabc4f74 /sha1_file.c
parentbf93eea0f67082ec295ac60fa78986f339adf2c6 (diff)
downloadgit-de7b5d6218e4b928c5a395e34e5e1de40fae2a0d.zip
git-de7b5d6218e4b928c5a395e34e5e1de40fae2a0d.tar.gz
git-de7b5d6218e4b928c5a395e34e5e1de40fae2a0d.tar.bz2
sha1_object_info_extended(): add an "unsigned flags" parameter
This parameter is not used yet, but it will be used to tell sha1_object_info_extended() if it should perform object replacement or not. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sha1_file.c b/sha1_file.c
index b0a3964..46ed1b1 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2514,7 +2514,7 @@ static int sha1_loose_object_info(const unsigned char *sha1,
return 0;
}
-int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi)
+int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi, unsigned flags)
{
struct cached_object *co;
struct pack_entry e;
@@ -2548,7 +2548,7 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi)
rtype = packed_object_info(e.p, e.offset, oi);
if (rtype < 0) {
mark_bad_packed_object(e.p, sha1);
- return sha1_object_info_extended(sha1, oi);
+ return sha1_object_info_extended(sha1, oi, 0);
} else if (in_delta_base_cache(e.p, e.offset)) {
oi->whence = OI_DBCACHED;
} else {
@@ -2570,7 +2570,7 @@ int sha1_object_info(const unsigned char *sha1, unsigned long *sizep)
oi.typep = &type;
oi.sizep = sizep;
- if (sha1_object_info_extended(sha1, &oi) < 0)
+ if (sha1_object_info_extended(sha1, &oi, LOOKUP_REPLACE_OBJECT) < 0)
return -1;
return type;
}