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

I feel like I have a bigger problem with "a sequence of commits" as a phrase than I do with whatever he wishes to call a branch. A commit itself is a sequence (it includes its own history!), so a sequence of a sequence is a confusing thing to talk about without any sort of qualification, since they're heavily constrained by being linked together. Moreover, what he's calling a sequence is really a DAG; it's not linear. Hearing "a sequence of commits" is so jarring that it conveys more confusion about git than anything else... perhaps that's why he gets corrected so often?

But in terms of what a branch is, if you don't want to call it a "ref", then I'd just say it's a commit symlink?




Hmm, I think you'd be going a bit far by calling each commit a sequence. A commit does not contain its parent commits: it only contains pointers to its parent commits. By that logic, a linked list isn't a sequence of nodes, since each node is itself the head of a sublist.


The pointer isn't really relevant to what I'm sharing. I'm talking about what it is logically, not how it might be represented physically. You could certainly make each commit contain the other one physically if you wanted to represent it that way in some programming language. Of course there's not much of a reason to, and it'd be annoying since they'd be different sizes, but it's not like your have infinite recursion or something preventing you from doing that.

What I meant is something else though. A linked list is a linked sequence of nodes (or a chain of nodes, if you wish to call it that). A branch is a linked DAG of nodes, if you wish to call it that. Calling a branch a sequence of commits feels like calling your extended family (or I guess your genealogy) "a sequence of people" - it misses some crucial aspects of the structure and just sounds very confused.




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

Search: