• Captain Beyond@linkage.ds8.zone
    link
    fedilink
    arrow-up
    6
    ·
    9 hours ago

    My pet peeve with conventional commits is that some brain genius decided to shorten “feature” into “feat”, a completely different word, in order to save three characters.

    I suppose implementing a feature can be a feat sometimes.

    • stembolts@programming.dev
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      edit-2
      6 hours ago

      I rarely read a comment I disagree with more than this, kudos.

      In a typical 60 character space, you want to dedicate 5% of your oneline space to the chatacters “ure” so that you don’t mistake “feature” with the other words in english that start with “feat-”?

      Yea, I don’t understand the reasoning behind that at all.

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    5
    ·
    20 hours ago

    Fuck no. Stop trying to stuff data into commit messages. Just describe your change succinctly so I know what you did. This “feat” “fix” and “chore” bullshit needs to stop.

    • Pamasich@kbin.earth
      link
      fedilink
      arrow-up
      2
      ·
      5 hours ago

      It’s 3-5 letters you slap at the start of your succinct change description. I don’t see how it’s that big of a deal to get this upset about.

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 hours ago

        Fine - then add 3-5 actually random letters to the start of all your commits from now on.

        No? I don’t understand what you’re so upset about…

        Because it’s NOISE that I’m sifting through as a tech lead. And they’re often lies anyway. “feats” can have refactors and bug fixes. fix can add new features. Devs are horribly bad at separating out these types of changes neatly when making commits. “chore” is just too cute by half. I know “Version bump: 1.2.3” is just a version bump - I don’t need you to whine about it being a chore.

        • Pamasich@kbin.earth
          link
          fedilink
          arrow-up
          1
          ·
          2 hours ago

          It sounds to me like you’re just dealing with people who write bad commit messages.

          Or commits in general if you’re dealing with “feats” containing bug fixes.

          It doesn’t sound to me like your core problem is with conventional commits themselves, but rather with how they’re done in your experience.
          Inconsistency and unclear meaning does make it just some random noise, but that’s not how the standard is meant, that’s just people using it irresponsibly.

          “chore” is just too cute by half. I know “Version bump: 1.2.3” is just a version bump - I don’t need you to whine about it being a chore.

          Worth noting that only fix and feat are actual types defined by the official spec. chore is only listed as an example of what custom types you could use. So as long as you make sure the rest of the team is on the same page, you can also use a different noun like bump or version instead.

          “feats” can have refactors and bug fixes. fix can add new features. Devs are horribly bad at separating out these types of changes neatly when making commits.

          Actually looking through Conventional Commit’s page again, I also found this on-topic Q&A question:

          What do I do if the commit conforms to more than one of the commit types?
          Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.

          When both a bug fix and a feat are in the same commit, the answer isn’t to use one or the other, but to simplify the commit. I personally see more valid overlap with refactor (which isn’t an official type), but with these two, it’s inexcusable imo.

    • SorteKanin@feddit.dk
      link
      fedilink
      arrow-up
      1
      ·
      7 hours ago

      Agreed. Just write like a normal person. Conventional commits is such an engineer thinig to do (I say this as a software engineer myself). It’s an overengineered solution for something that should just be a human message.

        • SorteKanin@feddit.dk
          link
          fedilink
          arrow-up
          2
          ·
          6 hours ago

          What worth is there in grepping for feat or chore? Seems pointless to me. Besides, you could also just grep through the git history of the actual code instead of grepping commit messages.

          Also, maybe I’m the weird one here, but in my career as a software engineer, I’ve never had to search through commits in such a way. There’s always been better options, like looking at the blame or history of a particular section of code or a file or something like that.

    • Kissaki@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 hours ago

      I want to be able to scan a commit log, not just read commit titles one by one.

      The type gives me a scoping of to be expected intention, change size, and potential for side effects. docs never have runtime side effects.

      The scope gives me categories to scan for. Which area of the project am I searching for? Which product feature? If there’s a user bug, I can check those in the specific area and more general ones first.

      I need scope to be small, so the visual scanability is not broken because of horizontal shifting of the actual commit change title.

      I made sure my team capitalizes the commit change title, as an additional visual queue for scanability; being able to blend out the prefix.

      Even if you don’t care about changelog generating or log scanability for developers searching, debugging, or analyzing, I find deliberate commit messages practice helpful in guiding both in thought and documenting though of what the intention of the commit is, whether to split changes because they’re logically unrelated/not the same step, etc.

      In a small project or freshly started project before going stable or sizable it may not be necessary, but I still enjoy following the general practice.

      (cut off because it’s a customer project, just to be sure)

      No prefixes is a lot less useful. Commits can provide structure and guidance.

      Personally, I don’t like chore though, and we don’t use it in our project, reducing the number of types. Typically, those are misc(proj) or misc(ci) instead.

      The customer receives a list of feat and fix commit titles as info with a release.

      Commits are already data. Metadata about changes. Merge commits are structured data, putting individual changes into structured context. Using short well defined prefixes/prefix formats is a logical extension.

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 hours ago

        The customer receives a list of feat and fix commit titles as info with a release.

        The problem is that the language customers want and the language developers want are different things. Abusing commit messages to try to create documentation is just a bad idea. Spend a few mins to summarize for your users what has changed. You should be able to pull the tickets that went into a release for that pretty easily. Hell have AI do it if you’re that lazy. But as a developer I want to know what your commit did. Just explain your change in a way that will help me later on.

    • codeinabox@programming.devOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      11 hours ago

      How would you automate changelog generation and semantic versioning without conventional commits? For me, this is the biggest selling point of this standard, when paired with tools like Release Please.

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 hours ago

        You don’t. Users are different audience than the development team. Messages intended for one group are different from those for the other. This is my biggest gripe about this “semantic” BS. Commit comments are for the dev team. You should summarize it in a way that makes sense to users.

        Every time I see a “changelog” from a team for something I use that is full of “fix: loop pointer in Foo.java” I just roll my eyes. Like that tells me anything useful. If I cam technically savvy enough and care I can go look at the git history. But as a user that’s meaningless.

    • Tanoh@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      11 hours ago

      I always write just WIP or something simple. Commit often, so you can easily go back if you mess something up.

      Then later when the branch gets merged, I squash it with a proper commit message (that no one will ever look at, but those are the rules!)

    • thenextguy@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      edit-2
      19 hours ago

      The bigger problem by far in my experience is getting devs to write more than ‘fixed bugs’ or other meaningless drivel. Trying to get them to conform to any standard like this would be impossible unless enforced by some commit hook (dear god no!).

      Even this new ‘standard’ shows the commit body as [optional]. The first line in a git commit is supposed to be a short summary, not the entire message. I try to write whole sentences, paragraphs and bullet lists in anything that isn’t trivial.

      My last job enforced a Jira ticket number looking thing, but didn’t actually check that it was a valid ticket. The number of times I would read a commit message with zero content, then go to jira to find some reference and either find the wrong ticket, or perhaps the right ticket, but still no description, … too damn high!

      • Kache@lemmy.zip
        link
        fedilink
        arrow-up
        1
        ·
        3 hours ago

        If devs on the team have trouble writing good commit messages, forcing input won’t really help

        IMO would be better off auto-pulling names of components that were touched into the message.

      • atzanteol@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        16 hours ago

        Oddly enough the folks I work with are really good at the Jira ticket thing and frankly it’s much more useful than “feat” prefixes on everything. Because the Jira ticket gives me a “why” which can be amazingly helpful when trying to figure out “why was this line added”.

        I have never once found feat/fix/chore to be of any use when looking at history. It’s useless noise.

        • nebeker@programming.dev
          link
          fedilink
          English
          arrow-up
          2
          ·
          3 hours ago

          I’m OK with Jira ticket for branch names and pull requests. If something needs paragraphs to explain it, it should be a ticket. By all means copy that to the pull request and then have it in the merge (or squash commit).

          If fact, I think I’ll suggest we automate that in my org - we’ve lived through a TFS to Jira migrations and it’s a lot harder to track down the original info now. If you migrate from GitHub to GitLab or ForgeJo, that’s one more layer of business knowledge and motivation that gets lost.

          Either way, I’m on board with a simple “Fixed API routing” or “Improved Artist card reflow” message. If I’m reading it, I’m already looking at the routes or the CSS.

        • morbidcactus@lemmy.ca
          link
          fedilink
          arrow-up
          2
          ·
          5 hours ago

          One thing I’ve found useful with some git forges (haven’t tried them all so no idea if it’s universal) is tagging commits to issues and/or prs. Never bothered with the auto close functionality but assuming people actually put details into tickets, it’s come in handy a bunch of times this year to figure out why something got implemented when the original contributor is long gone.