]> source.dussan.org Git - jgit.git/commit
UploadPack: support custom packfile-to-URI mapping 93/139993/19
authorJonathan Tan <jonathantanmy@google.com>
Tue, 2 Apr 2019 17:08:24 +0000 (10:08 -0700)
committerJonathan Tan <jonathantanmy@google.com>
Tue, 20 Aug 2019 17:54:20 +0000 (10:54 -0700)
commita004820858b54d18c6f72fc94dc33bce8b606d66
treef090c0d9732c8db6665d17aedc56ce5562b939d0
parentdb0eb9f8aef0beed0a8017d455bf016f2aae7647
UploadPack: support custom packfile-to-URI mapping

Teach UploadPack to take a provider of URIs corresponding to cached
packs. When fetching, if the client supports the packfile-uri feature,
and if such a cached pack were to be streamed, instead send the
corresponding URI.

This packfile-uri feature is implemented in the jt/fetch-cdn-offload
branch of Git. There is interest in this feature [1], but it is not yet
merged.

[1] https://public-inbox.org/git/cover.1552073690.git.jonathantanmy@google.com/

Change-Id: I9a32dae131c9c56ad2ff4a8a9638ae3b5e44dc15
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/CachedPackUriProvider.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java