2014年5月15日 上午2:19于 "Konstantin Khomoutov" <flatw...@users.sourceforge.net
>写道:
>
> 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 "|"
Cause posix is not the only things in the world,  we should accept exist of
other things.

> or "?" or whatever other funny characters in the names of files they use
> in the project -- why not?
Because of user experience, when he want to do some cross platform things,
he will got angry.

>
> What you *can* do though is to write (and distribute among your
Sounds good, but again, user experience.

> 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