From 677cdd33f2017474dae3327f275fb248e5e0e3aa Mon Sep 17 00:00:00 2001 From: MinRK Date: Fri, 3 May 2013 13:08:54 -0700 Subject: [PATCH] add git hooks for submodules A much less intrusive version of #3274 that has effect on checkout / pull / merge, rather than setup.py. It does require a user install step, because you cannot add active hooks to a repo. --- git-hooks/README.md | 13 +++++++++++++ git-hooks/post-checkout | 4 ++++ git-hooks/post-merge | 4 ++++ 3 files changed, 21 insertions(+) create mode 100644 git-hooks/README.md create mode 100755 git-hooks/post-checkout create mode 100755 git-hooks/post-merge diff --git a/git-hooks/README.md b/git-hooks/README.md new file mode 100644 index 000000000..51670b613 --- /dev/null +++ b/git-hooks/README.md @@ -0,0 +1,13 @@ +git hooks for IPython + +add these to your `.git/hooks` + +For now, we just have `post-checkout` and `post-merge`, +both of which just update submodules, +so make sure that you have a fully synced repo whenever you checkout or pull. + +To use these hooks, you can symlink or copy them to your `.git/hooks` directory. + + ln -s ../../git-hooks/post-checkout .git/hooks/post-checkout + ln -s ../../git-hooks/post-merge .git/hooks/post-merge + diff --git a/git-hooks/post-checkout b/git-hooks/post-checkout new file mode 100755 index 000000000..2e8348472 --- /dev/null +++ b/git-hooks/post-checkout @@ -0,0 +1,4 @@ +#!/bin/sh + +git submodule init +git submodule update diff --git a/git-hooks/post-merge b/git-hooks/post-merge new file mode 100755 index 000000000..2e8348472 --- /dev/null +++ b/git-hooks/post-merge @@ -0,0 +1,4 @@ +#!/bin/sh + +git submodule init +git submodule update