excalibur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <m...@leosimons.com>
Subject whitespace changes in commits
Date Fri, 08 Apr 2005 08:20:10 GMT
Hi gang,

Time for a subversion tip!

I've been seeing a whole lot of changes like the below. What happens is that
someone's editor strips out trailing whitespace (or adds it or whatever) and
then the diff gets a whole lot bigger than before. This makes diffs harder
to read and more importantly makes it a whole lot harder to do merging of
different source trees at some later point in the feature. Having recently
been through several such ordeals, I tell you, I know :-D

One common strategy here (if you can't configure your editor to stop this
kind of automatic reformatting) is to open up a file, have your editor
reformat, and commit with a message stating "whitespace" or similar. Then,
you make the actual changes and commit once more.

An alternative strategy can be to have a pre-commit tool that normalizes
source code formatting that developers run prior to commits, but since the
bunch of us are using a variety of OSes and environments in addition to a
variety of file formats that's kinda hard to get right :-D

Cheers!

LSD

On 06-04-2005 22:01, "farra@apache.org" <farra@apache.org> wrote:
<snip/>
> Modified: excalibur/trunk/buildsystem/maven.xml
> URL: 
> http://svn.apache.org/viewcvs/excalibur/trunk/buildsystem/maven.xml?view=diff&
> r1=160320&r2=160321
> ==============================================================================
> --- excalibur/trunk/buildsystem/maven.xml (original)
> +++ excalibur/trunk/buildsystem/maven.xml Wed Apr  6 13:01:44 2005
> @@ -16,12 +16,12 @@
>  limitations under the License.
>  -->
>  <project default="java:jar" xmlns:excalibur="excalibur" xmlns:deploy="deploy"
> xmlns:artifact="artifact" xmlns:maven="jelly:maven"
> xmlns:define="jelly:define" xmlns:j="jelly:core" xmlns:ant="jelly:ant">
> -    
> +
>      <define:taglib uri="excalibur">
>          <!--
>          @name the name of file to deploy
>          @dir the name of the directory the file lives in
> -        @type the maven "type". Slightly different behaviour: if you want a
> trailing 's' you 
> +        @type the maven "type". Slightly different behaviour: if you want a
> trailing 's' you
>          should add it (ie "jars" instead of "jar")
>          -->
>          <define:tag name="deploy">
> @@ -29,7 +29,7 @@
>              <j:set var="acct"
> value="${maven.repo.default.username}@${maven.repo.default.host}"/>
>              <j:set var="deployDir"
> value="${maven.repo.default.directory}/${pom.groupId}/${type}"/>
>              <j:set var="grp" value="${maven.repo.default.group}"/>
> -            
> +
<snip/>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@excalibur.apache.org
For additional commands, e-mail: dev-help@excalibur.apache.org


Mime
View raw message