http.c: Don't store destination name in request structures

The destination name within the object store is easily computed
on demand, reusing a static buffer held by sha1_file.c.  We don't
need to copy the entire path into the request structure for safe
keeping, when it can be easily reformatted after the download has
been completed.

This reduces the size of the per-request structure, and removes
yet another PATH_MAX based limit.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Shawn O. Pearce
2010-04-17 13:07:38 -07:00
committed by Junio C Hamano
parent 3065274c58
commit 0da8b2e7c8
3 changed files with 7 additions and 11 deletions

View File

@ -510,7 +510,7 @@ static int fetch_object(struct walker *walker, struct alt_base *repo, unsigned c
ret = error("File %s has bad hash", hex);
} else if (req->rename < 0) {
ret = error("unable to write sha1 filename %s",
req->filename);
sha1_file_name(req->sha1));
}
release_http_object_request(req);