[RFC 1/4] upload-file: Add upload-file command

2017-03-04 Thread Mark Thomas
The upload-file command allows a remote to request specific files by sha1. Signed-off-by: Mark Thomas --- .gitignore| 1 + Makefile | 2 ++ daemon.c | 6 + upload-file.c | 87 +++ 4 files changed, 96 insertions

[RFC 4/4] clone: Request on-demand shallow clones

2017-03-04 Thread Mark Thomas
their trees or blobs in the repository. Instead, they will be fetched on-demand from the remote. Signed-off-by: Mark Thomas --- builtin/clone.c | 7 ++- cache-tree.c| 2 +- fetch-pack.c| 3 +++ fetch-pack.h| 1 + shallow.c | 2 +- transport.c | 3 +++ transport.h

[RFC 2/4] on-demand: Fetch missing files from remote

2017-03-04 Thread Mark Thomas
If an object (tree, blob, ...) is not found either in the packs or loose, check if it is available on-demand from the remote. Signed-off-by: Mark Thomas --- Makefile| 1 + cache.h | 3 +- on_demand.c | 157 on_demand.h

[RFC 0/4] Shallow clones with on-demand fetch

2017-03-04 Thread Mark Thomas
r moving them to the LRU cache. - Add configurable remote to fetch from. - Documentation. - Much more. Please let me know what you think, and if an experienced git developer would like to help out with finishing this, that would be even better. Mark Thomas (4): upload-file: Add upload-f

[RFC 3/4] upload-pack: Send all commits if client requests on-demand

2017-03-04 Thread Mark Thomas
Signed-off-by: Mark Thomas --- builtin/pack-objects.c | 26 -- list-objects.c | 12 +++- list-objects.h | 13 - object.h | 1 + on_demand.c| 26 ++ on_demand.h| 4