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>
diff --git a/sha1_file.c b/sha1_file.c
index 2bd3acf..b0a3964 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -2662,8 +2662,7 @@
 	void *data;
 	char *path;
 	const struct packed_git *p;
-	const unsigned char *repl = (flag & LOOKUP_REPLACE_OBJECT)
-		? lookup_replace_object(sha1) : sha1;
+	const unsigned char *repl = lookup_replace_object_extended(sha1, flag);
 
 	errno = 0;
 	data = read_object(repl, type, size);