Difference between revisions of "Darcs vs. Git"

From HaskellWiki
Jump to navigation Jump to search
(replace, tests, wrong push)
 
(Added context for GHC's switch from darcs to git)
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
= Darcs Resources =
I don't understand why so many people move from darcs to git.
 
   
== darcs replace ==
+
* http://darcs.net/ Main site
   
  +
* http://darcs.net/FAQ
Darcs can replace identifiers, Git cannot.
 
I often rename identifiers.
 
The identifier substitution of Darcs both saves space
 
and allows for smooth merging.
 
In Git renamings of identifiers look like you alter a lot of lines here and there.
 
I don't think that Git can easily implement that feature,
 
because it has no notion of a patch.
 
   
  +
* http://www.haskell.org/haskellwiki/Darcs
== darcs check --test ==
 
   
  +
* http://en.wikibooks.org/wiki/Understanding_Darcs/Patch_theory_and_conflicts
Darcs lets you easily run a test suite after every commit.
 
Usually I register
 
   
  +
= Git resources =
: <code>cabal configure && cabal build && cabal haddock && cabal test</code>
 
   
  +
* http://git-scm.com/ Main site
as a darcs test.
 
After recording a patch,
 
darcs unpacks the repository temporarily in the state after adding the patch.
 
Then it runs the test suite within that temporary copy of the repository.
 
If you add a file the Cabal description but forgot <code>darcs add</code>
 
or vice versa, then the darcs test will quickly spot the problem.
 
   
  +
* http://git-scm.com/book
This almost not possible with Git.
 
It could certainly be hacked into <code>.git/hooks/pre-commit.sample</code>,
 
but the crucial feature of running a test
 
is to reject a commit if it does not pass the tests.
 
If there is a way in Git then it is by far more complicated than in Darcs.
 
   
  +
* http://gitref.org/
I see no reason why Git does not support pre-commit tests properly.
 
   
  +
* http://bramcohen.livejournal.com/74462.html
== Pushing to the wrong repository ==
 
   
It is very easy in Git to push commits
+
= GHC's switch from darcs to git =
to an unrelated repository or to the wrong branch of a repository.
 
And it is cumbersome and dangerous to get rid of the wrongly pushed commits,
 
if operating in a server git repository.
 
In darcs this cannot happen so easily
 
since normally darcs asks you which patch to push.
 
This way you can see early if something starts to go wrong.
 
   
  +
* http://www.haskell.org/pipermail/glasgow-haskell-users/2011-January/019752.html
== Update of working copy files ==
 
   
  +
* http://www.reddit.com/r/haskell/comments/ezgvs/rfc_migrating_ghc_development_to_git/ interesting thread
 
== Branches ==
 
 
== Merging ==
 
 
== GitHub ==
 
 
github sucks, looping scripts, pull requests, how to get a git repository
 

Latest revision as of 18:50, 18 June 2014