[Libreoffice-commits] .: g

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Dec 21 02:40:31 PST 2012


 g |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 0cac67b2703e7956c460e2e1f741c3453a2b173b
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Dec 21 04:33:20 2012 -0600

    set-up the hooks for submodules for recent git setup
    
    Change-Id: I52482d017966e1d9671f92f43ec9d8cac6daf602

diff --git a/g b/g
index 8ae49d9..0b322ed 100755
--- a/g
+++ b/g
@@ -52,7 +52,24 @@ local hook_name
 		ln -sf "${COREDIR?}/${repo?}/.git-hooks/${hook_name?}" "${hook?}"
 	    fi
 	done
+    elif [ -d .git/modules/${repo}/hooks ] ; then
+	for hook_name in $(ls -1 ${COREDIR?}/.git-hooks) ; do
+            hook=".git/modules/${repo?}/hooks/${hook_name?}"
+            if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+		rm -f "${hook?}"
+		ln -sf "${COREDIR?}/.git-hooks/${hook_name?}" "${hook?}"
+            fi
+	done
+        # override if need be by the submodules' own hooks
+	for hook_name in $(ls -1 ${COREDIR?}/${repo?}/.git-hooks 2>/dev/null) ; do
+            hook=".git/modules/${repo?}/hooks/${hook_name?}"
+            if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+		rm -f "${hook?}"
+		ln -sf "${COREDIR?}/${repo?}/.git-hooks/${hook_name?}" "${hook?}"
+	    fi
+	done
     fi
+
 }
 
 refresh_all_hooks()


More information about the Libreoffice-commits mailing list