mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-08-16 00:46:03 +00:00
Use git filters for incremental updates from a git repository.
This commit changes the git fetch algorithm to only retrieve blobs that aren't included in the previously deployed site manifest, if git filters are supported by the remote. It also changes how manifest entry sizes are represented, such that both decompressed and compressed sizes are stored. This enables computing accurate (and repeatable) sizes even after incremental updates. Co-authored-by: David Leadbeater <dgl@dgl.cx>
This commit is contained in:
co-authored by
David Leadbeater
parent
af40848d9f
commit
89c57cfadb
+1
-1
@@ -328,7 +328,7 @@ func getPage(w http.ResponseWriter, r *http.Request) error {
|
||||
case "zstd":
|
||||
// Set Content-Length ourselves since `http.ServeContent` only sets
|
||||
// it if Content-Encoding is unset or if it's a range request.
|
||||
w.Header().Set("Content-Length", strconv.FormatInt(*entry.Size, 10))
|
||||
w.Header().Set("Content-Length", strconv.FormatInt(entry.GetCompressedSize(), 10))
|
||||
w.Header().Set("Content-Encoding", "zstd")
|
||||
serveEncodingCount.
|
||||
With(prometheus.Labels{"transform": "zstd", "negotiated": "zstd"}).
|
||||
|
||||
Reference in New Issue
Block a user