]> xenbits.xensource.com Git - libvirt.git/commitdiff
Prohibit Windows special chars in filenames
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 29 Mar 2014 11:16:38 +0000 (12:16 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 29 Mar 2014 20:14:17 +0000 (21:14 +0100)
Using any of these chars [:*?"<>|] in a filename is forbidden on
Windows and breaks git operations on Windows as git is not able
to create those files/directories on clone or pull.

Because some of them can be used in UNIX filenames they tend to
creep into filenames; especially : in PCI/SCSI device names that
are used as filenames in test cases.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index a4ae9783b39ec9b27a28b3db7f29cf91e7b99e65..117584ceb2a8b4ed63b80f36144ae3f64712f418 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -912,6 +912,11 @@ sc_curly_braces_style:
                          'braces around function body, see'           \
                          'HACKING' 1>&2; exit 1; } || :
 
+sc_prohibit_windows_special_chars_in_filename:
+       @files=$$($(VC_LIST_EXCEPT) | grep '[:*?"<>|]');               \
+       test -n "$$files" && { echo '$(ME): Windows special chars'     \
+         'in filename not allowed:' 1>&2; echo $$files 1>&2; exit 1; } || :
+
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null