(original poster here)
I figured that someone might have already done it, but I didn't find these.
It's surprising because I wrote an extremely similar README file!
However it looks like he wrote the solution manually, whereas I couldn't as it's way too complicated with Paris' metro system. I wrote a small algorithm (using Python) to create the graph. I'll probably publish it, after I clean the code a little.
Oh. It was an in-person conversation, or possibly a Facebook message that @bburky and I had at some point. Let me see if I can dig it up, but I think it was pretty much just a screenshot of gitk on a particularly complex graph.
In response to your siblings, I think this use of git is delightful, and I don't want to take away from that. I love that people play with these tools.
As to Mercurial being better, I don't know but I doubt it.
My comment isn't even really directed at the appropriateness of DVCS specifically. It's just a general observation of using an acyclic tool to describe a network with cycles. We do that a lot, sometimes for play, sometimes for practicality, and sometimes because we just flip the fuckit bit. http://thechive.com/2009/11/11/there-i-fixed-it-23-photos/
The object model of git is described as a directed acyclic graph, thus by definition, it has no cycles, which wouldn't make sense for a version control system anyway.
That said, this is most likely just meant as a fun visualization, because the visualization does look like a railway map.
> perhaps this isn't an appropriate tool for this purpose
Isn't the sole reason this is on HN, on the frontpage, exactly the fact that git and it's graphs aren't appropriate at all for drawing metrolines and yet somebody though of it and then did it as well?
Well, you can do branches and multiple-parent merges, so as long as you don't care about directionality mapping to commits you can express the structure on connection, at least.
It seems that, apart from gitk, there are some tools built for displaying git commit graphs. http://stackoverflow.com/questions/1057564/pretty-git-branch...
In terms of the final use of this I haven't digged enough yet. What seems pretty straight forward is the potential of directed graphs for dashboard graphic interfaces. If you could export the git data to JSON, it shouldn't be very difficult to implement with D3 the dinamic generation of SVG's views. This way you might have a chance of making the graph interactive. Example: you could click on a node to retrieve the complete data contained in it, highlight a branch... Otherwise the graph might end not being very usable in terms of information organization or retrieval. However I'm very much for making cool things and not caring too much about usefulness. This is already a cool thing, thanks for sharing.
36 comments
[ 2.8 ms ] story [ 65.0 ms ] threadBut I guess finding connections and directions is a bit complicated (because after all the commits form a directed graph, as opposed to a subway map)
However it looks like he wrote the solution manually, whereas I couldn't as it's way too complicated with Paris' metro system. I wrote a small algorithm (using Python) to create the graph. I'll probably publish it, after I clean the code a little.
Very similar, to the point that I initially thought you had copied/plagiarized it, until I went and checked.
Actually, it was you Christian, who was describing the git graphs as train tracks and prompted me to do this.
vbarbaresi, you should include the script or whatever method you used to generate the metro. I noticed you also used --allow-empty.
Because git doesn't allow cycles? Then as cool as this is (and it's very cool), perhaps this isn't an appropriate tool for this purpose.
Or might the natural, human-built cycles be expressable as subrepositories?
Would Mercurial be more appropriate, or do you think DVCS are simply not an ideal way of mapping metro lines?
As to Mercurial being better, I don't know but I doubt it.
My comment isn't even really directed at the appropriateness of DVCS specifically. It's just a general observation of using an acyclic tool to describe a network with cycles. We do that a lot, sometimes for play, sometimes for practicality, and sometimes because we just flip the fuckit bit. http://thechive.com/2009/11/11/there-i-fixed-it-23-photos/
That said, this is most likely just meant as a fun visualization, because the visualization does look like a railway map.
I don't think the tooling is made for it either.
> git commit-tree <tree> [(-p <parent>)...] < changelog
Isn't the sole reason this is on HN, on the frontpage, exactly the fact that git and it's graphs aren't appropriate at all for drawing metrolines and yet somebody though of it and then did it as well?
Can't wait to see the pull requests:
- Family trees, genealogy
- Electrical circuit schematics
- Storylines for books, movies, RPG
- Accounting, ledgers
- Jurisprudence
etc.