summaryrefslogtreecommitdiff
path: root/sha1-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha1-file.c')
-rw-r--r--sha1-file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sha1-file.c b/sha1-file.c
index 77ccaab928..46072602ff 100644
--- a/sha1-file.c
+++ b/sha1-file.c
@@ -23,6 +23,7 @@
#include "sha1-lookup.h"
#include "bulk-checkin.h"
#include "repository.h"
+#include "replace-object.h"
#include "streaming.h"
#include "dir.h"
#include "list.h"
@@ -141,7 +142,7 @@ static int get_conv_flags(unsigned flags)
if (flags & HASH_RENORMALIZE)
return CONV_EOL_RENORMALIZE;
else if (flags & HASH_WRITE_OBJECT)
- return global_conv_flags_eol;
+ return global_conv_flags_eol | CONV_WRITE_OBJECT;
else
return 0;
}
@@ -1239,7 +1240,7 @@ int oid_object_info_extended(const struct object_id *oid, struct object_info *oi
int already_retried = 0;
if (flags & OBJECT_INFO_LOOKUP_REPLACE)
- real = lookup_replace_object(oid);
+ real = lookup_replace_object(the_repository, oid);
if (is_null_oid(real))
return -1;
@@ -1383,8 +1384,8 @@ void *read_object_file_extended(const struct object_id *oid,
const struct packed_git *p;
const char *path;
struct stat st;
- const struct object_id *repl = lookup_replace ? lookup_replace_object(oid)
- : oid;
+ const struct object_id *repl = lookup_replace ?
+ lookup_replace_object(the_repository, oid) : oid;
errno = 0;
data = read_object(repl->hash, type, size);