Hacker News new | past | comments | ask | show | jobs | submit login

Wait, Mercurial users start coding when they run into a problem with the tool?

I always start googling and hoping there's a stackoverflow question about it that has an answer that I don't get.




That certainly reflects my experience: I have a problem...

Mercurial: there's an extension for that!

Git: you can fix that just by adding --foo bar:buzz --derp herp to the commandline lol RTFM


Maybe somebody can add a extension to Mercurial that let's you use empty folders.....


Git and Mercurial both suffer from this "problem". Because manifests/trees must have contents (file hashes) to exist, you can't track an empty folder.

I suppose git's tree objects could point to the empty tree to record an empty folder, but most of the git code is comparing file blobs not trees.


In git, we solve this problem by sticking a .gitignore file in any directories we want to be part of the repo, but without the contents (cache folders, user-generated data destinations, etc.)

How do you get around this in mercurial?


It's usually .gitkeep from what I've seen. .gitignore usually lives in the repo root.


> How do you get around this in mercurial?

Same (with a .empty or .keep file).


Git's tree structure can certainly encode an empty directory, the problem is the index file can't.


I think the author was referencing hg's numerous extensions. In reality I think both git and hg users turn to Google when they get stuck (same for bzr, svn, cvs, and every other scm).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: