[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] CVS diff: hard vs. soft tabs



Mental Patient wrote:

I've done this with mixed results. In general if you're going to work on projects, its a good idea to come up with your format conventions first. :)

However, sometimes you just inherit code and really there isnt much you can do about it. Its right up there with cuddled elses, some people do it, others dont. CVS is going to have huge deltas due to indent formatting. If I'm going to change the format of the code, I will usually commit ONLY format changes with a comment to that effect, then commit code changes. It makes it easier to see what was actually changed that way. When you do huge reformats, you're going to wind up in merge hell if you have lots of developers or multiple branches of the code. It'll be difficult to tell what actually changed, vs what was merely moved around.

For things like indenting, etc, you could always adjust what you have your tabstop set to.


Another way is to *always* run your source files (and have your
colleagues do the same) through indent before committing changes.  Of
course, everyone needs to use the same options.  This ensures consistent
formatting, regardless of the individual text editors in use.

-Roberto

Attachment: pgprd5cRoj4y6.pgp
Description: PGP signature


Reply to: