]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Verify .gitignore entries
authorloli10K <loli10K@users.noreply.github.com>
Tue, 15 Jan 2019 19:56:29 +0000 (20:56 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 15 Jan 2019 19:56:29 +0000 (11:56 -0800)
This change adds a make target 'vcscheck' which scans the git workspace
for new, untracked files missing from the .gitignore configuration; this
is done to help prevent adding unwanted build artifacts to the source
tree during development.

Reviewed-by: Neal Gompa <ngompa@datto.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #8281

.gitignore
Makefile.am

index 6367ebf77892224f1bc3c6372343169fbba74c9c..99dc87c9481de03e3555d2d5a841a45b78b2e284 100644 (file)
@@ -60,3 +60,4 @@ cscope.*
 *.tar.gz
 *.patch
 *.orig
+*.log
index 43891af710ce6dff0b21e5fbcd46ba47b779dd48..02e10443485c190bd5c5157f95490eee71f45ab5 100644 (file)
@@ -75,7 +75,7 @@ install-data-hook:
        ln -fs zfs.release spl.release
 endif
 
-codecheck: cstyle shellcheck flake8 mancheck testscheck
+codecheck: cstyle shellcheck flake8 mancheck testscheck vcscheck
 
 checkstyle: codecheck commitcheck
 
@@ -117,6 +117,12 @@ testscheck:
                xargs -r stat -c '%A %n' | \
                awk '{c++; print} END {if(c>0) exit 1}'
 
+vcscheck:
+       @if git rev-parse --git-dir > /dev/null 2>&1; then \
+               git ls-files . --exclude-standard --others | \
+               awk '{c++; print} END {if(c>0) exit 1}' ; \
+       fi
+
 lint: cppcheck paxcheck
 
 cppcheck: