From: Michael P. <mic...@gm...> - 2010-12-04 00:53:47
|
Peter Stuge wrote: >> Pete Batard wrote: >> > my git/config for libusb is attached. >> >> Hm. You set safecrlf explicitly. My git config --help doesn't say >> what the default is, but I don't think safecrlf=false can ever be >> harmful. But I think autocrlf=true explains why you need -text in >> your repo. You have told us several times to set core.safecrlf=true, once privately to me in the beginning, and once to Orin here (which Pete responded to also): http://marc.info/?l=libusb-devel&m=126468835121169&w=4 But... I privately sent Pete this around Aug 2nd when .gitattributes were first changed: Michael wrote: > Hrm, well, maybe you can help me out here. I cannot get git to stop showing > me diffs against your master, and they're all > "whole-file-replacement-looking" things with the relevant files. > > $ git config -l |grep crlf > core.autocrlf=true > core.autocrlf=true > core.autocrlf=true > core.safecrlf=true > > Whenever I tell git to just overwrite the files with the ones from your > branch (like I sometimes do), it just tells me my working copy is clean > (nothing to do). But it still shows diffs. I'll try a few more things... As it stands, .gitattributes is still the only place I do not have any intention of mirroring Pete on, or at least not on certain lines (I can't remember if they were all a problem). It caused me a couple hours of trouble trying to fiddle with my repo and get it to work. Fortunately, I found some way to revert (well, reset), troublesome as even that was. I'd never had so much trouble with reset or checkout prior to that. I'm almost wondering if the situation is that we all have to have exactly the same settings, and that no one set is more forgiving than another? If that's the case (and it may not be), that would put to rest the argument about making git-users do more up front, since it could go either way. Peter wrote: >> I think whitespace=cr-at-eol is plain incorrect when working with >> libusb. It suggests that we would want CR in the repository, which >> isn't the case. Instead, we should use the tools, and git can handle >> CRLF conversion. Possibly we need to give it more accurate >> information (e.g. in .gitattributes) for it to work well, but -text >> is obviously not great for text files. Hrm, I also have this set. Could that be my problem, or did I misunderstand? Is it necessarily bad to have CR's in the repository? There are certainly some files that should be that way in the snapshot (and also some that should be LF-only in the snapshot). In particular, for the snapshot, I'd like to see the MSVC stuff, source files, and documentation as CRLF, and the bash/autotools/make-specific stuff as LF. Michael |