lkml.org 
[lkml]   [2021]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: Signed-off-by missing for commits in Linus' tree
On Wed, Feb 24, 2021 at 11:49:42AM +1100, Stephen Rothwell wrote:
> Hi Linus,
>
> On Tue, 23 Feb 2021 16:33:47 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote:
> >
> > On Tue, Feb 23, 2021 at 4:31 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > are missing a Signed-off-by from their committer.
> >
> > Gaah. Maybe I should do some pre-pull hook or something to notice this
> > automatically (like you clearly do).
>
> I have attached the scripts I run over things after fetching them, but
> before merging them (so not a hook, sorry). check_commits runs
> check_fixes - but just for my convenience.
>
> --
> Cheers,
> Stephen Rothwell

Based on the pre-push.sample file, here is what I've added to my
.git/hooks/pre-push hook:


z40=0000000000000000000000000000000000000000

while read local_ref local_sha remote_ref remote_sha
do
if [ "$local_sha" = $z40 ]
then
# Handle delete
:
else
if [ "$remote_sha" = $z40 ]
then
# New branch, examine all commits
range="$local_sha"
else
# Update to existing branch, examine new commits
range="$remote_sha..$local_sha"
fi

if ! $HOME/bin/check_commits "$range"; then
exit 1
fi
fi
done

(and I modified check_fixes and check_commits to exit non-zero on failure)


I wonder if we need this in Documentation/maintainer/configure-git.rst
and to put check_commits and check_fixes into tools/ somewhere?

(Though goodness, please never aim your hook at your tree's tools/
directory.)

--
Kees Cook

\
 
 \ /
  Last update: 2022-09-17 16:09    [W:0.270 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site