from Hacker News

Linus Torvalds: “GitHub creates useless garbage merges”

by wedesoft on 9/6/21, 8:31 PM with 102 comments

  • by warpech on 9/6/21, 8:50 PM

    Merges done from a GitHub Pull Request (PR) contain a reference to that PR. The reference is not even a full URL, but just a number (e.g. "#42"). You need to use the GitHub web UI to turn this number into a URL (or deduct it if you know the repo URL). If you have that, then you can go to the Pull Request web page when you can read the whole story about the merge.

    What Linus rightfully wants is the whole story right in the commit message of the merge.

    I think GitHub purposely makes condensed commit messages for merges as a way to hook users to their web UI.

  • by kklisura on 9/6/21, 9:03 PM

    I had to google what Torvalds currently do:

    ..."What is your job?" Torvalds replied, "I read and write a lot of email. My job really is, in the end, is to say 'no.' Somebody has to say 'no' to [this patch or that pull request]. And because developers know that if they do something that I'll say 'no' to, they do a better job of writing the code." [1]

    Do we have any idea what will happen to Linux once Torvalds is not there? Is there any example in history of OSS development as to what happens when BDFL [2] is not there anymore?

    [1] https://www.zdnet.com/article/linus-torvalds-im-not-a-progra...

    [2] https://en.wikipedia.org/wiki/Benevolent_dictator_for_life

  • by nanis on 9/7/21, 12:27 AM

    When I train developers on `git` in combination with GitHub, I emphasize that `git` the tool was written for a specific goal. Linus wrote it to replace BitKeeper for the express purpose of collaborating on the maintenance & development of the Linux kernel.

    The biggest problem is when developers who do not really understand version control at all (there are a lot of them -- they tend to think of it as a "save" mechanism) are allowed to use all the features of GitHub and can only do their work with buttons.

    For example, it is common for some developers to think that there are only two options when dealing with merge conflicts: "Accept theirs" or "accept ours" when, in reality, most real merge conflicts require a synthesis. Now, add to this the fact that such developers barely write commit message (seen too many projects with only "merge X and Y", "update", "fix bug", "implement feature" etc). The situation gets worse.

    Soon, you end up with a project where the only tool for locating any issue becomes `git bisect`.

  • by lifeisstillgood on 9/6/21, 9:05 PM

    Curious that this comes on front page along side the whole Atlassian / Jira debate.

    One of the major reasons Github does not / cannot do commit messages the way Linus likes is that the reasons why odd is changed are in and supposed to be in the ticket tracker (where non-coders / committers can view / comment / approve.)

    This is not a technical fix that github can make - this is a fundamental split about where the power lies - most companies do not have the final say, the source of truth, in their codebase and consequently their repos.

    Linus is on the side of history here. But for those of us coders living in ticket trackers for our daily job, it's a serious culture shock. For non- coders it's an existential threat.

    On a separate note, I think there is a space for using hashes to compress tickets and all the ancillary evidence and sign offs, into one artifact, and then reference that in the repo commit. But I just can't see it in my head

  • by superbatfish on 9/6/21, 9:30 PM

    From the headline, I thought this would be about github’s squash merges, which represent an extreme anti-pattern to any sane developer.
  • by bifrost on 9/6/21, 8:46 PM

    One of the few times I agree with Linus.
  • by im_dario on 9/7/21, 10:42 AM

    Now, I wish there were a guide to creating proper pull requests. From what I read, I got some things, but not a straightforward or actionable path. The only clear thing is the unmistakable feeling of not doing PRs properly.
  • by Mic92 on 9/7/21, 6:56 AM

    I still prefer github's UI and PR style over those ugly kernel mailinglists, where there is no merge status and no good CI integration and no good search unless you force yourself into using some complex mail setup.
  • by chrisseaton on 9/6/21, 8:42 PM

    Is there a way to sign your merge commits on GitHub? How do they get trusted?
  • by bborud on 9/6/21, 8:45 PM

    Sounds like it would be easy for Github to fix? No? Yes?
  • by Thristle on 9/6/21, 11:13 PM

    That's just a preference issue.

    If you just pick rebase instead of merge from the UI the commits will be merged without that "meta commit".

    No need to get all emotional

  • by Shadonototro on 9/6/21, 9:38 PM

    He is not wrong
  • by systemvoltage on 9/6/21, 8:46 PM

    Behind the rage, there is good wisdom in Linus’s rants.
  • by 908B64B197 on 9/6/21, 8:42 PM

    Clickbait tittle.

    It's not the content of what's merged that he's complaining about, it's the default formatting from the GitHub UI (no commit message for instance).

  • by moron4hire on 9/6/21, 9:04 PM

    The problem is that Git is used for two things: the Linux kernel and anything else. The Linux kernel has this really weird system of software development where nobody knows anyone else and they want to share all their changes over email. Torvalds, for reasons I can't figure out, only cares about that one, niche use case.
  • by ameixaseca on 9/6/21, 8:50 PM

    For anyone that haven't tried this yet, please have a look at 3-way merging. A number of tools support it, including simple ones like `meld`. I've been using it for a while and it has been a huge help on complicated merges.
  • by bigcorp-slave on 9/6/21, 8:46 PM

    Hot take: why do we still care? Linus says something negative about something, big shocker.

    This is just the tech crowd equivalent of a tabloid at the supermarket checkout isle, Tom Cruise is secretly a ferret-lover, read all about Bob’s torrid affair with Mallory!