[darcs-users] A comparison of Darcs and Git

Marc Weber marco-oweber at gmx.de
Tue Dec 15 23:28:36 UTC 2009

> Any clue to help me understand?

Hi Samuel,

You're right abuot pulling dependencies automatically.
So in the end it matters whether you have to move topics (= set of
patches) from one repo into another very often.
Best advice: Don't fork, keep one repository.
Merging repos can be a lot of work so you should know what you're going
to do no matter which vcs you're using.
This advice is very strict. I often use show cases to illustrate what
I'm talking about. Imagine Netbeans and Eclipse had the same origin.
Now try to merge them. This would be hell no matter which vcs you've
been using. I think you what I try to say.

I can't tell you in which system does smarter cherry-pick.
I can tell what I'm missing when using darcs:

- Speed. Git is still faster. No matter whether it's an initial
  get or a pull or blame.
  This does matter for bigger projects only.
- reflog: Git automatically tracks what you're doing. You can't delete
  any work by accident if you've committed it once.
- having many branches in one direcotry. That's just awesome.
  You don't have to create a different directory for each version
- each git commit has a uniq name: its hash.
  Does darcs use hashes as well now?
  Can I say darcs unpull $HASH ?
  Or darcs pull $HASH $REMOTE_REPO ?

So a lot of those issues can be implemented in darcs as well.
But nobody has done so yet (?)

Probably the main difference is that git authors wanted git to be a
"stupid" content tracker and darcs authors wanted darcs to be a smart
content tracker.

I think git people wanted git to be stupid because they knew it is too
much work to make a content tracker that smart so that it is useful.

In darcs you can record regex replacement change.
But when to apply this feature?

  ----- Main.hs ---
  fooBar = print "hello world"
  main = fooBar

  --- CHANGELOG: --
  v1.0:  introducing function fooBar

Now let's rename fooBar in XY yielding:

  ----- Main.hs ---
  XY = print "hello world"
  main = XY

  --- Changelog: --
  v1.0:  introducing function XY

Doh! Now our Changelog is wrong.

So we have to teach the replace command to be applied to .hs files
Should names in comments or strings be replaced as well?

That's what I mean when saying "darcs can be made much smarter".
You can teach it to refactor your code automatically.
Ocasionally you have to use CPP.. and things are getting complex.
Probably this is so much work that nobody will ever implement it.

I still can imagine that darcs gets more things done right.
Eg it may rename 10 function names correctly while failing in one case
updating the Changelog as well.
Which failure is worse? Git not updating 10 occurences or darcs
updating the Changelog as well? I don't know.

That's why I can understand the git choice creating a "stupid" content
tracker only.

IMPORTANT: I have to say that I'm not using darcs very often.
So everything I said about darcs may be wrong..

Anyway I'm interested in camp and its guis.
Compiling it is on my TODO list.

Marc Weber

More information about the darcs-users mailing list