From 300779e5e298d66bb16a581129134906c1be0acc Mon Sep 17 00:00:00 2001
From: Yuanle Song <sylecn@gmail.com>
Date: Wed, 16 Oct 2019 02:09:34 +0800
Subject: [PATCH] fix git pre-commit hook.

only run check on master branch.
pkg branch is just for zero.el distribution.

minor, update doc.
---
 NOTICE               | 2 +-
 README               | 5 +++++
 git-hooks/pre-commit | 6 ++++--
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/NOTICE b/NOTICE
index 19d0a4a..f330689 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 zero-el
 Copyright (C) 2019 Yuanle Song <sylecn@gmail.com>
 
-ibus-compute-pixel-position function in zero.el is copied from ibus.el.
+zero--ibus-compute-pixel-position function in zero.el is copied from ibus.el.
 This function is under GPLv3 license.  Copyright (C) 2010-2012 S. Irie
diff --git a/README b/README
index 3a521f0..cecd0e2 100644
--- a/README
+++ b/README
@@ -8,6 +8,11 @@ zero-el provides zero-pinyin, an Emacs pinyin input method for Chinese and
 zero-framework, which is an emacs Chinese input method framework.
 
 * File list
+- zero.el
+
+  It's a generated file for one-file package distribution. Not used for
+  development.
+
 - zero-framework.el
 
   zero framework source code. This provides the framework and user interface
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit
index dea3124..8231387 100755
--- a/git-hooks/pre-commit
+++ b/git-hooks/pre-commit
@@ -1,4 +1,6 @@
 #!/bin/sh
 set -e
-make dist-check
-git add zero.el
+if git branch |grep '^\* master'; then
+	make dist-check
+	git add zero.el
+fi
-- 
GitLab