Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-15 23:54:52 +0400
committerJunio C Hamano <gitster@pobox.com>2011-05-16 02:23:33 +0400
commit4bbf5a2615420ac50c696b72dc303727e6218562 (patch)
treed829a6b6fcac5228fb1964239b3d8a582d58a25f /builtin/mktag.c
parentabb25ac365791e16563dfd09e4ecd3e7e4dcf6b1 (diff)
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 'builtin/mktag.c')
-rw-r--r--builtin/mktag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/mktag.c b/builtin/mktag.c
index 324a267163d..640ab64f418 100644
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
@@ -23,8 +23,8 @@ static int verify_object(const unsigned char *sha1, const char *expected_type)
int ret = -1;
enum object_type type;
unsigned long size;
- const unsigned char *repl;
- void *buffer = read_sha1_file_repl(sha1, &type, &size, &repl);
+ void *buffer = read_sha1_file(sha1, &type, &size);
+ const unsigned char *repl = lookup_replace_object(sha1);
if (buffer) {
if (type == type_from_string(expected_type))