summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-15 19:54:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-15 22:23:33 (GMT)
commit4bbf5a2615420ac50c696b72dc303727e6218562 (patch)
treed829a6b6fcac5228fb1964239b3d8a582d58a25f /cache.h
parentabb25ac365791e16563dfd09e4ecd3e7e4dcf6b1 (diff)
downloadgit-4bbf5a2615420ac50c696b72dc303727e6218562.zip
git-4bbf5a2615420ac50c696b72dc303727e6218562.tar.gz
git-4bbf5a2615420ac50c696b72dc303727e6218562.tar.bz2
read_sha1_file(): get rid of read_sha1_file_repl() madness
Most callers want to silently get a replacement object, and they do not care what the real name of the replacement object is. Worse yet, no sane interface to return the underlying object without replacement is provided. Remove the function and make only the few callers that want the name of the replacement object find it themselves. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/cache.h b/cache.h
index e09cf75..a9ae100 100644
--- a/cache.h
+++ b/cache.h
@@ -758,11 +758,7 @@ int offset_1st_component(const char *path);
/* Read and unpack a sha1 file into memory, write memory to a sha1 file */
extern int sha1_object_info(const unsigned char *, unsigned long *);
-extern void *read_sha1_file_repl(const unsigned char *sha1, enum object_type *type, unsigned long *size, const unsigned char **replacement);
-static inline void *read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size)
-{
- return read_sha1_file_repl(sha1, type, size, NULL);
-}
+extern void *read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size);
extern const unsigned char *lookup_replace_object(const unsigned char *sha1);
extern int hash_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *sha1);
extern int write_sha1_file(const void *buf, unsigned long len, const char *type, unsigned char *return_sha1);