News for hackers. Stuff that matters.
Re:The Real Difference Between Git and Mercurial by gcp on Thursday January 19, 2012 @02:39PM (#3486229)
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

Re:The Real Difference Between Git and Mercurial by mariusmg on Thursday January 19, 2012 @03:07PM (#3486387)
Maybe somebody can add a extension to Mercurial that let's you use empty folders.....
Re:The Real Difference Between Git and Mercurial by xentac on Thursday January 19, 2012 @03:14PM (#3486434)
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.

Re:The Real Difference Between Git and Mercurial by pavel_lishin on Thursday January 19, 2012 @04:05PM (#3486698)
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?

Re:The Real Difference Between Git and Mercurial by getsat on Thursday January 19, 2012 @04:38PM (#3486883)
It's usually .gitkeep from what I've seen. .gitignore usually lives in the repo root.
Re:The Real Difference Between Git and Mercurial by tonfa on Thursday January 19, 2012 @08:19PM (#3487812)
> How do you get around this in mercurial?

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

Re:The Real Difference Between Git and Mercurial by eridius on Thursday January 19, 2012 @03:45PM (#3486607)
Git's tree structure can certainly encode an empty directory, the problem is the index file can't.