From ebef1a355f1104a55d24010bc0d2be772849fa3e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Oct 2017 22:24:34 +0200 Subject: cgit: reduce log spam --- krebs/3modules/git.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/git.nix b/krebs/3modules/git.nix index 610c20bb4..ba0924681 100644 --- a/krebs/3modules/git.nix +++ b/krebs/3modules/git.nix @@ -420,7 +420,16 @@ let ]; locations."/".extraConfig = '' include ${pkgs.nginx}/conf/fastcgi_params; - fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi; + fastcgi_param SCRIPT_FILENAME ${pkgs.writeDash "cgit-wrapper" '' + set -efu + exec 3>&1 + ${pkgs.cgit}/cgit/cgit.cgi "$@" 2>&1 >&3 3>&- \ + | ${pkgs.gnused}/bin/sed \ + ' + \|^${pkgs.cgit}/cgit/cgit.cgi: Relink |d + ' + exec 3>&- + ''}; fastcgi_param PATH_INFO $uri; fastcgi_param QUERY_STRING $args; fastcgi_param HTTP_HOST $server_name; -- cgit v1.2.3 From daca154ce3c75d232ed6c8ccc2375ac681b213ad Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Oct 2017 23:37:37 +0200 Subject: git-preview: use worktrees --- krebs/5pkgs/simple/git-preview/default.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/git-preview/default.nix b/krebs/5pkgs/simple/git-preview/default.nix index f20f2a636..77826f34b 100644 --- a/krebs/5pkgs/simple/git-preview/default.nix +++ b/krebs/5pkgs/simple/git-preview/default.nix @@ -1,15 +1,16 @@ -{ coreutils, git, stdenv, writeDashBin }: +{ coreutils, git, writeDashBin }: writeDashBin "git-preview" '' - PATH=${stdenv.lib.makeBinPath [ - coreutils - git - ]}''${PATH+:$PATH} - hashes=$(git log --format=%h "..$1") - end=$(echo "$hashes" | head -1) - start=$(echo "$hashes" | tail -1) - # exit if no diff was found - test -z "$start" && exit 0 - shift - git diff "$start^..$end" "$@" + set -efu + head_commit=$(${git}/bin/git log -1 --format=%H) + merge_commit=$1; shift + merge_message='Merge for git-preview' + preview_dir=$(${coreutils}/bin/mktemp --tmpdir -d git-preview.XXXXXXXX) + preview_name=$(${coreutils}/bin/basename "$preview_dir") + ${git}/bin/git worktree add --detach -f "$preview_dir" 2>/dev/null + ${git}/bin/git -C "$preview_dir" checkout -q "$head_commit" + ${git}/bin/git -C "$preview_dir" merge -qm "$merge_message" "$merge_commit" + ${git}/bin/git -C "$preview_dir" diff "$head_commit.." "$@" + ${coreutils}/bin/rm -fR "$preview_dir" + ${coreutils}/bin/rm -R .git/worktrees/"$preview_name" '' -- cgit v1.2.3 From de93609ea27beeac2055fcba93f1319809dc512a Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 18 Oct 2017 19:49:55 +0200 Subject: news: add painload --- krebs/2configs/news.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/2configs/news.nix b/krebs/2configs/news.nix index 56395c166..2628c7986 100644 --- a/krebs/2configs/news.nix +++ b/krebs/2configs/news.nix @@ -16,6 +16,7 @@ vimperator|https://sites.google.com/a/vimperator.org/www/blog/posts.xml|#news weechat|http://dev.weechat.org/feed/atom|#news xkcd|https://xkcd.com/rss.xml|#news + painload|https://github.com/krebscode/painload/commits/master.atom|#news ''; }; } -- cgit v1.2.3 From 15ca4d1d1f2e2942e6d8bce368414baa28205f3d Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 18 Oct 2017 19:50:33 +0200 Subject: Reaktor plugins: fix wiki-todo-show --- krebs/5pkgs/simple/Reaktor/plugins.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index c611d7471..518e80d0e 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -144,7 +144,8 @@ rec { ''; }; wiki-todo-show = buildSimpleReaktorPlugin "wiki-todo" { - script = pkgs.writeDash "wiki-todo-add" '' + pattern = "^wiki-show$"; + script = pkgs.writeDash "wiki-show" '' ${pkgs.coreutils}/bin/cat wiki-todo ''; }; -- cgit v1.2.3