[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Call pre-commit hook from pre-push script



commit 705c1c28c710b70406712027833ab739729ee583
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date:   Fri Apr 5 18:51:24 2019 +0300

    Call pre-commit hook from pre-push script
---
 scripts/git/pre-push.git-hook | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/git/pre-push.git-hook b/scripts/git/pre-push.git-hook
index e7a72efa0..f32982934 100755
--- a/scripts/git/pre-push.git-hook
+++ b/scripts/git/pre-push.git-hook
@@ -27,6 +27,13 @@ ref_is_upstream_branch() {
         fi
 }
 
+workdir=$(git rev-parse --show-toplevel)
+if [ -x "$workdir/.git/hooks/pre-commit" ]; then
+  if ! "$workdir"/.git/hooks/pre-commit; then
+    exit 1
+  fi
+fi
+
 # shellcheck disable=SC2034
 while read -r local_ref local_sha remote_ref remote_sha
 do



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits