X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=http-push.c;h=0353f9f5143d7fff3a2b4b11d02375255258319b;hb=HEAD;hp=33db41bfac5f977747ce7af864207df3f255e491;hpb=d2e4e26d13d75a4b8b35d222148af1380fe0c480;p=thirdparty%2Fgit.git diff --git a/http-push.c b/http-push.c index 33db41bfac..7315a694aa 100644 --- a/http-push.c +++ b/http-push.c @@ -1,3 +1,5 @@ +#define USE_THE_REPOSITORY_VARIABLE + #include "git-compat-util.h" #include "environment.h" #include "hex.h" @@ -1016,6 +1018,7 @@ static void remote_ls(const char *path, int flags, /* extract hex from sharded "xx/x{38}" filename */ static int get_oid_hex_from_objpath(const char *path, struct object_id *oid) { + memset(oid->hash, 0, GIT_MAX_RAWSZ); oid->algo = hash_algo_by_ptr(the_hash_algo); if (strlen(path) != the_hash_algo->hexsz + 1) @@ -1307,7 +1310,7 @@ static struct object_list **process_tree(struct tree *tree, obj->flags |= SEEN; p = add_one_object(obj, p); - init_tree_desc(&desc, tree->buffer, tree->size); + init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size); while (tree_entry(&desc, &entry)) switch (object_type(entry.mode)) { @@ -1552,7 +1555,7 @@ static void fetch_symref(const char *path, char **symref, struct object_id *oid) free(url); FREE_AND_NULL(*symref); - oidclr(oid); + oidclr(oid, the_repository->hash_algo); if (buffer.len == 0) return;