Re: [PATCH] scripts: add

From: Borislav Petkov
Date: Tue Dec 18 2012 - 13:28:42 EST

On Mon, Dec 17, 2012 at 11:09:43AM -0800, Joe Perches wrote:
> This needs a new test here to avoid chirping
> on files that aren't added, deleted or renamed.
> next if ($realfile eq $modifiedfile);

Hmm, I don't think that catches file renames when using the normal 'git
diff' output:

$ git mv README README.old

And this detection should work in the default case with a pre-commit
hook. For example, I have this in .git/hooks/pre-commit:

if git rev-parse --verify HEAD >/dev/null 2>&1
# Initial commit: diff against an empty tree object

git diff --cached $against -- | ./scripts/ --strict --no-signoff -

and when I do this, I get the changes checked:

$ git commit -a
README.old:5: trailing whitespace.
+kernel, and what to do if something goes wrong.
README.old:19: trailing whitespace.
+ accompanying COPYING file for more details.
README.old:47: trailing whitespace.
+ these typically contain kernel-specific installation notes for some
README.old:287: trailing whitespace.
+ - Keep a backup kernel handy in case something goes wrong. This is
README.old:301: trailing whitespace.
+ to the place where your regular bootable kernel is found.
README.old:314: trailing whitespace.
+ Reinstalling LILO is usually a matter of running /sbin/lilo.
README.old:317: trailing whitespace.
+ work. See the LILO docs for more information.
README.old:325: trailing whitespace.
+ recompile the kernel to change these parameters.
README.old:327: trailing whitespace.
+ - Reboot with the new kernel and enjoy.
README.old:394: trailing whitespace.
+ interesting one.
README.old:412: new blank line at EOF.

but not the MAINTAINERS check.

git diff --cached HEAD gives:

diff --git a/README b/README.old
similarity index 100%
rename from README
rename to README.old

so I'd say we're almost there.



Sent from a fat crate under my desk. Formatting is fine.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at