[llvm-commits] [llvm] r64827 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Target/PowerPC/PPCISelLowering.cpp lib/Target/X86/X86ISelLowering.cpp

Scott Michel scottm at aero.org
Tue Feb 17 14:52:35 PST 2009


On Feb 17, 2009, at 2:36 PM, Dale Johannesen wrote:

>
> On Feb 17, 2009, at 2:20 PMPST, Duncan Sands wrote:
>
>> Hi Scott,
>>
>>> (Note: Eventually, commits like this will be handled via a pre- 
>>> commit hook that
>>> does this automagically, as well as expand tabs to spaces and  
>>> look for 80-col
>>> violations.)
>>
>> the last time I read the subversion book, it recommended not doing  
>> this.
>> They instead advised having a script that rejects a commit if it  
>> introduces
>> trailing whitespace.
>
> Whoa!  There is absolutely no reason (except pedantry) to disallow  
> this, and everybody's time would be better spent working on things  
> that actually matter.
> If you've got an editor that makes changes to your code you didn't  
> tell it to, that's a serious bug; I'd either fix it or get a  
> different editor.
> I realize not everybody sees things that way, but I see no reason  
> your misguided opinion should interfere with my work.:)  A script  
> along the lines Scott suggests is OK (assuming it doesn't slow  
> things down noticeably), but I strongly object to having patches  
> rejected for mere pedantry.

Wait a second -- there's a bit of an overreaction to the "Note:",  
IMNSHO. It's got nothing to do with "an editor that changes your code  
you didn't tell it to"; it's not as if vim or Eclipse functionally  
changed the code. The editor is merely doing some grooming that's  
functionally a NOP. Many editors do this, including Emacs with the  
right flags set. Heck, even NetBeans does this by default as does  
Eclipse.

I'm happy to find out the consensus for why a commit should be  
rejected by a pre-commit script. I'm not completely wedded to the  
idea of stripping off trailing whitespace, but it would seem to be a  
useful grooming feature.

-scooter




More information about the llvm-commits mailing list