55

I would like to ask the following question about the internals of Git:

Using git log --graph shows a visualization of the history of a Git project, showing where new branches were created and merged. What algorithm does Git use internally to generate this visualization?

The main thing I'm interested in is how the algorithm decides where to place pipes, slashes, and asterisks in order to denote commits and branches. I'm not as interested in, for example, the data structure Git uses to represent the visualization or how it walks to the revision tree to build the visualization. I would like to know because my team is planning on implementing our own Git visualization, and we would like to at least understand how Git is able to deterministically build its visual graph.

Would it be on-topic on Stack Overflow? If not, is there a Stack Exchange site where this would be appropriate?

In general, are questions about how tools work internally on-topic?

6
  • 1
  • 12
    Seems like it could be too broad...at least unless you're very specific about what you want to know about it, so that it could be answered in a paragraph or two.
    – Servy
    Jun 29, 2015 at 17:49
  • @Servy Thanks for the feedback! I updated my question with some more detail.
    – Kevin
    Jun 29, 2015 at 18:01
  • 2
    I don't understand enough about the topic to know how complex of an explanation would be necessary to explain the concepts you're asking about. It sounds like it's something to be concerned about though. It's at least close to the line, regardless of which side it falls on.
    – Servy
    Jun 29, 2015 at 18:02
  • I was about to ask my question on SO, but it has already been asked here: stackoverflow.com/questions/4739683/…
    – Kevin
    Jun 29, 2015 at 18:58
  • In my opinion it is on topic as long as it satisfies all the on-topic criteria. Even a git question can be too broad or "write my code for me" type of question. However if it fits all the other criteria, it should be perfectly valid. Jun 29, 2015 at 21:28

1 Answer 1

80

Since Git is open source, I'd say it's on-topic. If you were asking a question about a closed-source tool that only a handful of people could answer, it probably wouldn't be well received. Since anyone can go to the Git source code and have a look, asking questions about its internal workings doesn't seem that unreasonable.

10
  • 55
    Of course, "do my work for me" questions are also off topic, so you should make some effort examining the source code to learn for yourself. Come back if you're confused about something.
    – user1228
    Jun 29, 2015 at 19:05
  • 7
    @Will '"do my work for me" questions are also off topic' - that should be a close reason or more explicit. Jun 30, 2015 at 7:53
  • 4
    At least a downvote "does not show any research effort" would certainly seem very reasonable if the question shows no indication either that the questioner has examined the source or else there's a reason why that's not possible (doesn't know C, is about the only excuse I can think of). Jun 30, 2015 at 12:28
  • @Will: as a practical matter, how do you vote to close a question on those grounds? Off-topic, but there's no sub-reason that obviously matches, so do you use an "other" comment? Saying what, exactly? Jun 30, 2015 at 12:33
  • @SteveJessop AFAIK you don't vote to close those questions, just downvote. Sometimes "too broad" is applicable, but not always.
    – Ajedi32
    Jun 30, 2015 at 13:11
  • 2
    @SteveJessop Off topic because you need to do yo own damn work snaps fingers in Z formation, head moving side to side
    – user1228
    Jun 30, 2015 at 14:32
  • 1
    +1 for being able to see Bill again after his retirement
    – user719662
    Jun 30, 2015 at 16:12
  • @Will I upvoted your comment, but there's one concern. I don't consider myself a bad programmer, or having a lack of knowledge. However, I find that looking through open-source projects is often very confusing and hard to do. For example, if this is even the correct file, I'm not sure, where does one start in trying to understand that? Well, maybe a C programmer can a bit, but we aren't all C programmers. To me it looks like mostly gibberish. How do I ask questions about gibberish? I can't, AFAIK. Jul 1, 2015 at 18:50
  • 1
    @ChrisCirefice perhaps the solution is to hire someone who can?
    – user1228
    Jul 1, 2015 at 18:54
  • @Will I was talking in the general sense of 'curiosity questions' like the OP's where some popular open-source thing is build in some language that they can't read to save their lives (like Git, C and me). And I wouldn't say it's a problem that OPs entire shop could theoretically be Java-guys who can't read C; is OP specifically mentioning that they have read the source, but can't figure it out, 'enough' to appease the SE community into not downvoting him into oblivion for 'not enough research effort'? Jul 1, 2015 at 19:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .