]> Cypherpunks.ru repositories - nncp.git/commitdiff
Yet another git-related exec-handler example
authorSergey Matveev <stargrave@stargrave.org>
Tue, 14 May 2019 10:41:52 +0000 (13:41 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 14 May 2019 10:43:03 +0000 (13:43 +0300)
doc/git-bundler.sh [new file with mode: 0755]
doc/integration.texi

diff --git a/doc/git-bundler.sh b/doc/git-bundler.sh
new file mode 100755 (executable)
index 0000000..70df771
--- /dev/null
@@ -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
index 729752e99a5c392d476c70ffba8709c974347f70..cad1b9444f852e179d50ec74dcbdd4665e06c609 100644 (file)
@@ -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