Re: Switching from CVS to GIT
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Oct 16, 2007, 13:50 UTC
- Message-ID
- <26554F2D-B44D-4691-A696-9B6924E08599@zib.de>
- In-Reply-To
- <Pine.LNX.4.64.0710161419140.25221@racer.site>
On Oct 16, 2007, at 3:21 PM, Johannes Schindelin wrote:
Show 32 quoted lines
> Hi, > > On Tue, 16 Oct 2007, Steffen Prohaska wrote: > >> On Oct 16, 2007, at 2:33 PM, Johannes Schindelin wrote: >> >>>> Maybe we need a configuration similar to core.autocrlf (which >>>> controls >>>> newline conversion) to control filename comparison and >>>> normalization? >>>> >>>> Most obviously for the case (in-)sensitivity on Windows, but I also >>>> remember the unicode normalization happening on Mac's HFS >>>> filesystem >>>> that caused trouble in the past. >>> >>> Robin Rosenberg has some preliminary code for that. The idea is >>> to wrap >>> all filesystem operations in cache.h, and do a filename >>> normalisation >>> first. >> >> At that point we could add a safety check. Paths that differ only by >> case, or whitespace, or ... (add general and project specific >> rules here) >> should be denied. This would guarantee that tree objects can >> always be >> checked out. Even if the filesystem capabilities are limited. > > This would be an independent change. The method I talked about > only ever > looks at one filename, never what is already there.
Oh, hmm ... obviously, ... if I think about it ;)
Show 6 quoted lines
> What you want would probably be all too easy with a pre-commit > hook. No > need to clutter the git-core with code that is usually not needed > (you'd > only ever activate it on Linux when other developers use Windows or > MacOSX).
Personally, I'd be very happy if git enforced the minimal consent between (supported) filesystems and provided a system to guarantee that I can only create tree objects that can be checked out on all (supported) filesystems.
I'd _always_ switch on such a mechanism. I think the idea of relying on filenames that only differ by whitespace or case is insane independent of the capabilities of the filesystem used. Humans hardly see such differences. There may be other characters that should be avoided purely for technical reasons. If git checked this, too, I'd be happy.
An update hook is only very loosely coupled to git. I'd prefer a tighter integration. 'git add <something>' should immediately report the problem. But, maybe I'll try a commit hook first.
Steffen