DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] scripts: add git hook scripts for checkpatch and auto doc generation
Date: Thu, 03 Dec 2015 11:09:30 -0800 (PST)	[thread overview]
Message-ID: <1582860.nH8UZnCz1p@xps13> (raw)
In-Reply-To: <1448634897-1193-1-git-send-email-ferruh.yigit@intel.com>

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

  reply	other threads:[~2015-12-03 19:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 23:22 [dpdk-dev] [PATCH] " Ferruh Yigit
2015-11-06 13:48 ` Ferruh Yigit
2015-11-06 13:48   ` Ferruh Yigit
2015-11-24 17:44     ` Thomas Monjalon
2015-11-24 18:04       ` Ferruh Yigit
2015-11-06 14:03   ` Ferruh Yigit
2015-11-27 14:34 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2015-12-03 19:09   ` Thomas Monjalon [this message]
2015-12-07 13:32     ` Ferruh Yigit
2015-12-07 15:06       ` [dpdk-dev] [PATCH v3] " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1582860.nH8UZnCz1p@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).