summaryrefslogtreecommitdiff
path: root/archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'archive.c')
-rw-r--r--archive.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index 6cfb9e42d6..ff2bb54f62 100644
--- a/archive.c
+++ b/archive.c
@@ -275,9 +275,11 @@ int write_archive_entries(struct archiver_args *args,
int err;
struct strbuf path_in_archive = STRBUF_INIT;
struct strbuf content = STRBUF_INIT;
- struct object_id fake_oid = null_oid;
+ struct object_id fake_oid;
int i;
+ oidcpy(&fake_oid, null_oid());
+
if (args->baselen > 0 && args->base[args->baselen - 1] == '/') {
size_t len = args->baselen;