From: Sergey Matveev Date: Tue, 14 May 2019 10:41:52 +0000 (+0300) Subject: Yet another git-related exec-handler example X-Git-Tag: v5.0.0^2~26 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9448255f6ffce556f73df0210a5fd2fc01213eff;p=nncp.git Yet another git-related exec-handler example --- 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