Re: [PATCH] checkpatch.pl: perform commit ID check from external to git folder

From: Leon Romanovsky
Date: Thu Jun 11 2020 - 16:08:13 EST


On Thu, Jun 11, 2020 at 11:22:41AM -0700, Joe Perches wrote:
> On Thu, 2020-06-11 at 15:59 +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >
> > The execution of scripts/checkpatch.pl in folder outside of git produces
> > complains about invalid commit ID, despite having valid one.
>
> There is already a slightly different test for this in -next
> It also uses a environment test for GIT_DIR.

If you are referring to this commit
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/scripts/checkpatch.pl?h=next-20200611&id=5bff933936a76a839e3c7f47f193cbf0d9904543

It didn't work for me, because I'm not setting GIT_DIR environment and
use "--root" switch from checkpatch.pl.

>
> Try that one.

It doesn't make too much sense to have two options to configure git
directory, one is GIT_DIR and another --root.

Thanks

>
>