From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id E4E674A63 for ; Thu, 3 Dec 2015 20:09:30 +0100 (CET) Received: by wmww144 with SMTP id w144so34372695wmw.1 for ; Thu, 03 Dec 2015 11:09:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=AJLwsYrL7dA+se4kpcO2yT9swJiHmh78CmKu/mF9PUI=; b=kyt7mNOOKQxkbNVVwnjmC36i3x38ni+cLNd4iibmNCicuwpQpqaqfpJwMwacVHoxko uC0Vfv8RxPY6vEuO+OIXodhpih4azdoDPvbLvR8uAhWghVhFt906jhdnnFD3WfqRR8FQ Db+355RoUDwIajjasIfqxJpKr/D2stHr4gxbHdvVjSFgN8vUpwETKR8MJ4T8RFj139SI e7adUeBIfRIUOKeoyPH/x8Y6reOy/q29+Z3WbNy143inbgdNvIbvyJ2izUgSJdCIEJcW hUB6WuqfhVq9v5SF2pwX6mIUT/vqCge8JvFSwH0rI3seSzu3O+WqlFZdv/i/DWcXthAd zJ1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=AJLwsYrL7dA+se4kpcO2yT9swJiHmh78CmKu/mF9PUI=; b=DtJOu6UU4YDuf77TiIPVqMF+PPpVWEoO7dPeCaEsxMS/4Z0XsWkRufwExq7t+UGGoQ zBaAdmWGRk2Sk8keKfgWZsYw6+Hln4f6dCtHGolPC1lYhOniUkBZ8vFhjTHUO0B1Kz8H T/LcJBUtSWcTe3U8cSbGmkh2M++OnVkm4v2RKpkCIxKhyM+fuSenW9wqansc4ZJkjvNu s0D7mZRTnF0cMlaMFmjIZtPyoDTmNPZVrLeeafB7wxNav+7By64qtkTI0nv0bC93h2jv UaKMjesTlQXcBYFX2KKGFZdxRG1PD+m1cS9kizelbjjnvoIWVPbwOqCyPNp4B+ZZZ2uR /YjA== X-Gm-Message-State: ALoCoQmBHz7pa4PhzJsa95tZ1fEie8EoyhEtuGJ8HKKnU8h02Rfvquxs/u2xDU5KbtwqTisaWICc X-Received: by 10.194.185.42 with SMTP id ez10mr14633557wjc.82.1449169770802; Thu, 03 Dec 2015 11:09:30 -0800 (PST) Received: from xps13.localnet (110.204.154.77.rev.sfr.net. [77.154.204.110]) by smtp.gmail.com with ESMTPSA id w4sm8833812wje.49.2015.12.03.11.09.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Dec 2015 11:09:30 -0800 (PST) Date: Thu, 03 Dec 2015 11:09:30 -0800 (PST) X-Google-Original-Date: Thu, 03 Dec 2015 20:04 +0100 From: Thomas Monjalon To: Ferruh Yigit Message-ID: <1582860.nH8UZnCz1p@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1448634897-1193-1-git-send-email-ferruh.yigit@intel.com> References: <1446160974-31675-1-git-send-email-ferruh.yigit@intel.com> <1448634897-1193-1-git-send-email-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] scripts: add git hook scripts for checkpatch and auto doc generation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 19:09:31 -0000 Ferruh, I have a lot of questions :) 2015-11-27 14:34, Ferruh Yigit: > --- a/scripts/checkpatches.sh > +++ b/scripts/checkpatches.sh > @@ -43,6 +43,7 @@ length=${DPDK_CHECKPATCH_LINE_LENGTH:-80} > > # override default Linux options > options="--no-tree" > +options="$options ${GIT_HOOK_OPTIONS}" What is the purpose of this variable? Why adding some options would be specific to git hooks? > +++ b/scripts/git-hooks/deploy.sh > @@ -0,0 +1,20 @@ > + > +SELF=$(basename $0) > + > +if [ ! -f ${SELF} ]; then > + echo "Please run script from folder where script is" > + exit 1 > +fi You do not need to exit. Just cd $(dirname $0). > +for f in ${FILES}; do > + ln -sf ${SCRIPT_FOLDER}/${f} ${TARGET_FOLDER}/${f} > +done; You do not need the ; > --- /dev/null > +++ b/scripts/git-hooks/post-commit > +if [ -n "$RTE_DOC_OUT" ]; then > + OUT_CMD="O=${RTE_DOC_OUT}" > +fi How to pass RTE_DOC_OUT to the hook? Why not use load-devel-config.sh? > +make ${OUT_CMD} doc-guides-html 2>&1 > /dev/null > +make ${OUT_CMD} doc-api-html 2>&1 > /dev/null Why hiding the errors? > --- /dev/null > +++ b/scripts/git-hooks/post-merge Does it work for "git pull --rebase"? > --- /dev/null > +++ b/scripts/git-hooks/pre-commit > +# If "git commit" called with "--no-verify" option, pre-commit hooks > +# bypassed and this script not called, checkpatch bypassed Possible reword: It is skipped with the option "--no-verify" of "git commit". > +RTE_CHECKPATCH=$PWD/scripts/checkpatches.sh What is PWD when calling the hook. May it be a subdir? > +PATCH=/tmp/dpdk-git-auto-checkpatch-$$.patch You need to remove this temporary file when exiting. But it would be better to use stdin. It may need a patch on checkpatches.sh wrapper. In chekpatch.pl: "When FILE is - read standard input". > +export GIT_HOOK_OPTIONS=--no-signoff This variable is wrongly named. > +git diff --cached > ${PATCH} > +exec ${RTE_CHECKPATCH} ${PATCH} When the new "make install" will be applied, I think we should skip these files. Please consider patching mk/rte.sdkinstall.mk. Thanks