aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http-fetch.c1
-rw-r--r--http-push.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/http-fetch.c b/http-fetch.c
index fe8cd7bdc..67dfb0a03 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -809,6 +809,7 @@ static int fetch_pack(struct alt_base *repo, unsigned char *sha1)
return error("Unable to start request");
}
+ target->pack_size = ftell(packfile);
fclose(packfile);
ret = move_temp_to_file(tmpfile, filename);
diff --git a/http-push.c b/http-push.c
index 7e73eac9c..0a15f5378 100644
--- a/http-push.c
+++ b/http-push.c
@@ -770,11 +770,14 @@ static void finish_request(struct transfer_request *request)
request->url, curl_errorstr);
remote->can_update_info_refs = 0;
} else {
+ off_t pack_size = ftell(request->local_stream);
+
fclose(request->local_stream);
request->local_stream = NULL;
if (!move_temp_to_file(request->tmpfile,
request->filename)) {
target = (struct packed_git *)request->userData;
+ target->pack_size = pack_size;
lst = &remote->packs;
while (*lst != target)
lst = &((*lst)->next);