From ac89322c51584f3a50de405668f2f1dbe47b010b Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Wed, 10 Feb 2021 12:32:17 +0100 Subject: www-apps/cgit: Drop Since we no longer need or want to install cgit via portage, this patched version can go. --- .../files/cgit-1.2.3-disable-cached-clones.patch | 58 ---------------------- 1 file changed, 58 deletions(-) delete mode 100644 www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch (limited to 'www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch') diff --git a/www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch b/www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch deleted file mode 100644 index c9c547e..0000000 --- a/www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 8f9eeb3280c43ef184eb6ce08b322bc7d9ad6c3f Mon Sep 17 00:00:00 2001 -From: Wynn Wolf Arbor -Date: Fri, 3 Jul 2020 15:17:02 +0200 -Subject: [PATCH 1/2] cache: Disable caching for clones - -Whilst the cache feature is useful for content that the web browser will -see, it is less useful when cgit is asked to clone a repository. Users -might end up with a tree that is ever so slightly out of date. - -An upcoming commit will introduce functionality to offload clones to -git-http-backend(1). The cache feature will prevent this from working -correctly. - -Therefore, disable cache processing for commands that have the is_clone -flag set. ---- - cache.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/cache.c b/cache.c -index 2c70be7..bb4fc47 100644 ---- a/cache.c -+++ b/cache.c -@@ -15,6 +15,7 @@ - - #include "cgit.h" - #include "cache.h" -+#include "cmd.h" - #include "html.h" - #ifdef HAVE_LINUX_SENDFILE - #include -@@ -356,6 +357,7 @@ int cache_process(int size, const char *path, const char *key, int ttl, - struct strbuf filename = STRBUF_INIT; - struct strbuf lockname = STRBUF_INIT; - struct cache_slot slot; -+ struct cgit_cmd *cmd; - int result; - - /* If the cache is disabled, just generate the content */ -@@ -370,6 +372,15 @@ int cache_process(int size, const char *path, const char *key, int ttl, - fn(); - return 0; - } -+ -+ cmd = cgit_get_cmd(); -+ -+ /* Do not cache files that are being cloned */ -+ if (cmd && cmd->is_clone) { -+ fn(); -+ return 0; -+ } -+ - if (!key) - key = ""; - hash = hash_str(key) % size; --- -2.27.0 - -- cgit v1.2.3-2-gb3c3