On Thu, 15 May 2014 00:32:39 +0800
罗勇刚(Yonggang Luo)  <luoyongg...@gmail.com> wrote:

> I report to here because it's not a problem of msysgit, I was ask git
> do the following things:
> when commit newly added files, check the filename if its can be used
> under multiple environment.
> such as | for example is illegal under Windows.

This requirement has no sense: Git can potentially work on an unbounded
number of filesystems so there's no sensible way to implement such a
check in Git itself.
Another thing to consider is that if a developer knows up front that
their code will ever be worked with on systems having only, say,
POSIX-compliant filesystems (which only prohibit NUL and '/' in the
pathnames of the files they store), they might as well decide to use "|"
or "?" or whatever other funny characters in the names of files they use
in the project -- why not?

What you *can* do though is to write (and distribute among your
developers) a pre-commit hook [1] which will check the files about to be
committed and abort the commit if it finds something strange.

Another option is to implement such checking in a centralized
repository, if you have one.

P.S.
All in all, I think your problem is a purely political one, not
techincal: I don't think it's that hard to circulate a message among
your developers stating that they should use only simple names for
their files.  Those who fail that can be routinely penalized using
methods known for centuries.

1. https://www.kernel.org/pub/software/scm/git/docs/githooks.html

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to