[darcs-users] A comparison of Darcs and Git

Marc Weber marco-oweber at gmx.de
Wed Dec 16 03:02:03 UTC 2009


Excerpts from twb's message of Wed Dec 16 03:01:27 +0100 2009:
> Marc Weber <marco-oweber at gmx.de> writes:
> 
> > - each git commit has a uniq name: its hash.
> >   Does darcs use hashes as well now?
> 
> It has had hashes since 2.0.0.

Yes, I know about the --hashed option etc.
But when running darcs changes -v | less
I can't see them.
Of course I can try to find a uniq part of the commit message to pull a
patch. But don't you think typing 5 chars of a hash is even smarter ?
Why? You can automate distributing a patch to multiple branches.
I'm doing that with git or a PHP project. Many customers share the same
code base except some design differences.

> Never ever ever.  I've made my case against "darcs replace" in previous
> threads, which I'm too lazy to dig up citations for.
> > Probably this is so much work that nobody will ever implement it.
> That was the consensus regarding a "smart" replace operation.
> See also "structured editing".
 
So darcs is a stupid content tracker as well keeping smart patch
dependency information ;-)

I asked at #git now. Git can't find out on which commits a commit
depends. So if you get conflicts you can start searching those commits.

Anyway I think it could be done by git -> darcs -> git :)

And there are more differences: git has a *lot* more man power ..
git is being reimplemented in Java and .net now.
However I don't think we actually care about that.

So if you have to move many patches consider using darcs.
If you expect to have a very linear history only git may be the better
choice.

git provides some advanced tools such as topGit.
You can start writing multiple features at the same time and merge them
with other feature branches or upstream. When you feel a feature branch
is ready to be comitted you can squash all merge Commits into one Commit
and feed that upstream. You can build trees of topics.

It would be very interesting to compare how darcs would solve this task.
Probably you'd keep amend-recording to one patch.

In git you'll never see this because you can't cherry-pick if you've
unmerged files:

v v v v v v v
1
*************
2
*************
3
^ ^ ^ ^ ^ ^ ^

3 commits all changing the same line.

Funny: If you commit a merge resolution for 1 2 = "1\n2" then pull 3 you end up with

v v v v v v v
1
2
*************
1
2
*************
3
^ ^ ^ ^ ^ ^ ^

Probably I really have to read more about darcs theory.
I don't have time at the moment..

Marc Weber


More information about the darcs-users mailing list