JBoss Community

Re: Moving to git from svn?

created by Jason Greene in JBoss Transactions Development - View the full discussion

This is just my opinion, but the strongest and most convincing reason to move JBoss Transactions to GIT would be a stricter quality / review process. This is because GIT lets you do the following:

  1. Prevent changes from being merged until they are widely reviewed by everyone and finally approved by the maintainer(s). This is usually one person but can have some redundancy if need be
    1. All changes have multiple "eyes" on them
    2. Testing is ran by multiple parties
    3. Everything implicitly gets an architectural and design review
  2. Isolate and test individual features separate from the main tree. This means that regressions can be tested and caught before they are ever in the public master branch. Note that unlike SVN these branches are relatively easy to sync and can be long running,

 

In addition it's easier to track down the source of a problem in the event that the above processes fail. Git has a command called "bisect" that automates an O (log N) search through your commit history for the regression. So the process for finding the failure becomes

  1. Write a test case that shows the failure
  2. Start a bisect from the last known good commit
  3. Execute the test, and upon success call "git bisect good", failure call "git bisect bad". This can be easily scripted
  4. Have a cold beer

 

Some other powerful benefits are:

  1. Do work on an airplane (no server required) [also useful when JBoss.ORG goes down]
  2. Quickly switch branches, make changes, create new branches etc (much better productivity)
  3. Cryptographically secure history. Every change is a SHA1 of the change + commit + past change. Therefore, it is near impossible to hack the code/history of a git repo. To do it you have to change the SHA1s, and once you do that all other copies in the world will show yours is a fake.
  4. Extra redundancy (everyone has a copy), and easier migration (quick/easy to copy)

 

The drawbacks to moving to GIT are

  1. Maintaining a GIT repo requires a lot of GIT knowlege (the person(s) in charge of approving / pushing changes). This can lead to folks transitioning that are unfamiliar with it having a hard time. Before moving any project of this nature to GIT, you should get to know it, and read some of the material and ask for help from others.
  2. Contributers that are used to svn or cvs will have to learn something very different. Much less knowledge is needed than 1) but it's still enough that it will require ramp-up to those unfamiliar with it
  3. If it aint broke.....

Reply to this message by going to Community

Start a new discussion in JBoss Transactions Development at Community