Live data from Hacker News

Git's initial commit

github.com

101–110 of 128 posts

Re: Git's initial commit

#101
post #11

Earlier quoted context omitted.

Given that the only way to reuse it is to duplicate the tree and commit metadata exactly, or find an sha1 collision, I think it's pretty safe. :) I wonder if there are any git sha1 collisions out there in aggregate, say across all of github. Would they even notice if there were?

>I wonder if there are any git sha1 collisions out there in aggregate, say across all of github. Despite the incredibly high number of all commits there must be, I think the chance of a collision is still very unlikely. 2^160 is a pretty big number.

Too bad he didn't use SHA-256 though. It had been available for three years at that moment.

Re: Git's initial commit

#102

My god... the comments. Looks like the reddit culture (i.e. fun for in jokes but not particularly professional)

"A marathon of clicking 'next page,' but the view is worth it." So, this commenter practically worships git, but apparently doesn't actually understand it well enough to know a better way to find the hash of the first commit and punch that into Github. Or, it was just a joke and they got there the quick way, but still felt obliged to post a dumb joke to inflate their own ego by "leaving their mark" on git. Maybe I'm…

AFAIK you can't search by commit hash. You have to do some URL manipulation.

Re: Git's initial commit

#103
post #79
post #51

Earlier quoted context omitted.

I consider that a bug in their style spec. Single line if statements are known to cause bugs.

That's what I'd thought for may be over a decade. About ~3 years ago I revamped my personal coding style to eliminate as unnecessary baggage as possible. As part of that I stopped using braces for single line if and I'd yet to bump in a bug because of that. Overall I find code looks more compact and cleaner, may be even less friction to read. Nowadays when I see a braces around single line if I get that "oh that's cl…

There's an enormous difference with Python, because the indentation is syntax. These two code snippets, one in Python, the other in C, do not mean the same thing:

C:

  if (condition)
    statement_1();
    statement_2();
Python:

  if condition:
    statement_1()
    statement_2()
Personally, I always use braces in C and C++, even though it is more clunky. I want the assurance. I also frequently have to make changes to code that does not use braces, and then I have to add the braces in because I am adding statements to a conditional. To me, that is more clunky.

Re: Git's initial commit

#104

My god... the comments. Looks like the reddit culture (i.e. fun for in jokes but not particularly professional)

"A marathon of clicking 'next page,' but the view is worth it." So, this commenter practically worships git, but apparently doesn't actually understand it well enough to know a better way to find the hash of the first commit and punch that into Github. Or, it was just a joke and they got there the quick way, but still felt obliged to post a dumb joke to inflate their own ego by "leaving their mark" on git. Maybe I'm…

> Maybe I'm being too mean, but yeah, I also think a lot of the comments are pointless.

Yeah, I think you're being a little mean. If you browse to that user's GitHub page, it looks like it's just somebody new who's excited about software. Good for them.

The comments are pointless, sure, but also harmless. Similar comments might crowd out productive discussion if they were on (say) the head of the master branch, but I doubt that any serious development is happening on git's initial commit anyway. Let the new people have their fun.

As far as newbie disruptiveness goes, it could be far worse. When I was getting started with Linux, I posted this cringeworthy gem to LKML, now enshrined in the archives for all eternity: https://lkml.org/lkml/2000/10/22/69 If newbies today are merely posting "yay, git!" and "thank you!" to a secondary forum where it doesn't disrupt development, I'd say they're doing pretty well in comparison. :)

Re: Git's initial commit

#105
post #73
post #32

Earlier quoted context omitted.

Done. Don't ask me how I did it, but you will never see that hash come up again naturally during your lifetime.

it is SHA-1 though, might still be broken during our liftime

Which is why he added the caveat "naturally".

Re: Git's initial commit

#107
post #102

Earlier quoted context omitted.

"A marathon of clicking 'next page,' but the view is worth it." So, this commenter practically worships git, but apparently doesn't actually understand it well enough to know a better way to find the hash of the first commit and punch that into Github. Or, it was just a joke and they got there the quick way, but still felt obliged to post a dumb joke to inflate their own ego by "leaving their mark" on git. Maybe I'm…

AFAIK you can't search by commit hash. You have to do some URL manipulation.

  git rev-list --max-parents=0 HEAD | tail -1

Re: Git's initial commit

#108
post #36

Well, while we're looking at FIRST POSTS, here's Mercurial's, self-hosting a month after git, and like git, also created to replace bitkeeper: http://selenic.com/hg/rev/0#l10.1 The revlog data structure from then is still around, slightly tweaked, but essentially unchanged in almost a decade.

Mercurial is impressive for making Git's UI look intuitive.

Re: Git's initial commit

#109

Earlier quoted context omitted.

Does anyone know if the structure of git has changed much? I would like to read this thinking this is pretty close to the current implementation but I would have no idea. anyone?

You can just see the structure with git cat-file -> % git cat-file -p 8c48d1a36c3d11db44c75a431d4f09cb0035222f tree 288c2d5379768f685f391bdbffd31b8965318c63 parent 002ae35061beef02453b7fb1045a50fa2f7f30f8 author Denis Bilenko 1246939605 +0700 committer Denis Bilenko 1246939605 +0700 MANIFEST.in: include libevent.h and libevent-internal.h -> % git cat-file -p 288c2d5379768f685f391bdbffd31b8965318c63 100644 blob 6e543d…

While it looks arcane, this comes in handy enough when grepping through history that I actually have "cat-file -p" aliased to 'cf'.
Post reply on HN