• HaraldvonBlauzahn@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    4 days ago

    Sometimes, I look into old commit messages.

    The most useful bits it can have are:

    • Why was the change made?
    • What does it intend to fix? Issue number?
    • What does the commiter think why it works?
    • How well was this tested? Where is the test script and/or test data?
    • Does it change preconditions and valid assumptions elsewhere?
  • Captain Beyond@linkage.ds8.zone
    link
    fedilink
    arrow-up
    12
    ·
    edit-2
    6 days 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
      8
      arrow-down
      2
      ·
      edit-2
      6 days 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.

      • bignose@programming.dev
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        4 days ago

        In a typical 60 character space, you want to dedicate 5% of your oneline space to the chatacters “ure” […]?

        I agree, that’s an unnecessary crowding of an already limited space.

        This is a good argument for removing that tag from the synopsis line entirely, leaving the whole synopsis line for an actual synopsis of the message.

        For tags and other additional metadata, there is a whole arbitrary-length extended message on every commit, where fields like that can be put.

        • stembolts@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          I agree with your argument. My main use case of tags is to indicate if that commit builds or not, I could probably just reduce it to a Boolean represented by one character, that way I’d get differentiation in my synopsis while still compressing it.

          This thread has given me a lot to think about. I may abandon my current form of tagging. Idk tho, it’s nice to be able to visually filter chore commits from features from wip from fixes.

          I’m torn.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    6
    arrow-down
    3
    ·
    6 days ago

    Yeah these are just awful to read. Feat/bug/chore is pretty much the most useless information to know about a commit.

    You should just describe the change. On very large projects having a component: prefix can be useful but honestly, barely. The most common way to arrive at a commit is through a link or git blame or similar when you already have context. I very rarely actually exhaustively read a list of commits.

    And if you want to automate your change log (which you probably shouldn’t do anyway), you can just as easily put that metadata in the commit body. In fact it’s probably better there because you can write a user-targeted description too.

    Conventional Commits is one of those weird ideas that seems to make developers think they’re doing something useful but only if you don’t think about it too much.