Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>With Git, you have an entire copy of the repository for your personal use, so munging files during a commit them isn't a problem. After all, you're just affecting yourself.</p> <p>However, Subversion has a centralized repository which means that munging files during a commit is trickier and is usually discouraged.</p> <p>One of the issues is that this type of thing has to be handled by a hook, and hooks, since they run on the server, don't have access to your working copy. They can examine the commit via the read-only svnlook command, but that's it. Yes, there are ways to get around it, but as the manual said, it is not recommended.</p> <p>Even with version control systems like Git and ClearCase where it is possible to munge files during a commit, it is still not a good idea. First of all, it can slow down the commit process as the hook script runs which can frustrate the user. Second of all, what happens if the munging process actually breaks the file? Developers are suppose to test and verify their changes before committing them. "Breaking a build" is a crime even worse than taking the last cup of coffee in the break room and not making another pot. Yet, here's a developer who did everything they're suppose to, and it was the stupid hook script that did it!</p> <p>This is something that should be done by the automated build process (you are using an incremental build system like CruiseControl or Hudson right?). This can be done as part of the testing and the build can be marked as "unstable" if the file isn't formatted correctly. In fact, Hudson has hooks that can do this as part of the build process which makes doing this very simple. The build server can notify the programmer of his misdeed (Bad programmer! The file is poorly indented! No donut for you!) and the technical lead or the build manager.</p> <p>What gets checked in is what the developer wrote and tested. Checks for formatting, unit testing, and all that other stuff can be done by the build system.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload