[tasks] 03/07: Set up task-history-git hooks

Ximin Luo infinity0 at debian.org
Mon Oct 24 16:17:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository tasks.

commit 2627a87cd5cdc7c68244150bfb2897a4f314e4b8
Author: Ximin Luo <infinity0 at debian.org>
Date:   Mon Oct 24 17:49:08 2016 +0200

    Set up task-history-git hooks
---
 .gitignore           |  2 ++
 hooks/on-exit_git.sh |  1 +
 pending.data         |  0
 task                 | 12 +++++++++---
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 61b89fb..f0f5a1f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 /taskrc.local
+/*.data
+!/pending.data
diff --git a/hooks/on-exit_git.sh b/hooks/on-exit_git.sh
new file mode 120000
index 0000000..c6f4d61
--- /dev/null
+++ b/hooks/on-exit_git.sh
@@ -0,0 +1 @@
+../task-history-git/on-exit_git.sh
\ No newline at end of file
diff --git a/pending.data b/pending.data
new file mode 100644
index 0000000..e69de29
diff --git a/task b/task
index 9de422b..459ad32 100755
--- a/task
+++ b/task
@@ -1,5 +1,11 @@
 #!/bin/sh
-dir="$(git rev-parse --show-toplevel)"
-export TASKRC="$dir/taskrc"
-export TASKDATA="$dir"
+set -e
+workdir="$(git rev-parse --show-toplevel)"
+
+# Set up task-history-git
+git submodule update --init
+ln -rsf "$workdir/task-history-git/post-merge" "$(git rev-parse --git-path hooks)/post-merge"
+
+export TASKRC="$workdir/taskrc"
+export TASKDATA="$workdir"
 exec task "$@"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/tasks.git



More information about the Reproducible-commits mailing list