From 9448255f6ffce556f73df0210a5fd2fc01213eff Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 14 May 2019 13:41:52 +0300 Subject: [PATCH] Yet another git-related exec-handler example --- doc/git-bundler.sh | 14 ++++++++++++++ doc/integration.texi | 5 +++++ 2 files changed, 19 insertions(+) create mode 100755 doc/git-bundler.sh diff --git a/doc/git-bundler.sh b/doc/git-bundler.sh new file mode 100755 index 0000000..70df771 --- /dev/null +++ b/doc/git-bundler.sh @@ -0,0 +1,14 @@ +#!/bin/sh -ex + +tmp=$(mktemp) + +cleanup() +{ + rm -f $tmp +} +trap cleanup HUP PIPE INT QUIT TERM EXIT + +read revs +cd $HOME/git/$1.git +git bundle create $tmp $revs +nncp-file -nice $NNCP_NICE $tmp $NNCP_SENDER:$1-$(date '+%Y%M%d%H%m%S').bundle diff --git a/doc/integration.texi b/doc/integration.texi index 729752e..cad1b94 100644 --- a/doc/integration.texi +++ b/doc/integration.texi @@ -349,6 +349,11 @@ HTTP/FTP/NNCP resuming capabilities. After you fetch repository via the bundle, you can add an ordinary @file{git://} remote and fetch the difference. +Also you can find the following exec-handler useful: +@verbatiminclude git-bundler.sh +And it allows you to request for bundles like that: +@code{echo some-old-commit..master | nncp-exec REMOTE bundler REPONAME}. + @node Multimedia @section Integration with multimedia streaming -- 2.48.1