{"thread":{"id":"24978","subject":"Could #-ignoring in commit message be smarter?","startedAt":"2010-09-04T22:24:36Z","lastAt":"2010-09-04T22:44:51Z","messageCount":3,"participants":["Ævar Arnfjörð Bjarmason","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"149891","messageId":"AANLkTimgt6kjTkc+gxyOmTz03bdnfiRzgt4p8vymQ=VY@mail.gmail.com","threadId":"24978","inReplyTo":null,"subject":"Could #-ignoring in commit message be smarter?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-04T22:24:36Z","receivedAt":"2010-09-04T22:24:36Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sat, Sep 4, 2010 at 21:55, Sverre Rabbelier <srabbelier@gmail.com> wrote:\n> Heya,\n>\n> On Sat, Sep 4, 2010 at 16:37, Ramana Kumar <ramana.kumar@gmail.com> wrote:\n>> The commit message message says \"Lines starting with '#' will be\n>> ignored\", but fails to say \"Lines below this message will be ignored,\n>> even if they don't start with '#'\".\n>\n> Because they're not. Only those starting with # are ignored.\n\nWhich also sucks a bit. I've been bit by writing commits messages like\nthis numerous times:\n\n    parser: fix non-\\W issues\n\n    This change is here to fix screwups of special characters like %, !,\n    #, ^ and other non-\\W chars.\n\n    These characters screw up our parser.\n\n    # Please enter the commit message for your changes. Lines starting\n    # with '#' will be ignored, and an empty message aborts the commit.\n    # On branch master\n    # Changes to be committed:\n    #   (use \"git reset HEAD <file>...\" to unstage)\n    #\n    #   modified:   parser.c\n\nWhere I'm referencing the #-character in the commit message itself for\nsome reason, and due to word wrapping it just *happens* to end up at\nthe start of a line. So the commit message silently becomes:\n\n    parser: fix non-\\W issues\n\n    This change is here to fix screwups of special characters like %, !,\n\n    These characters screw up our parser.\n\nThe main reason for why this probably can't be fixed is that we've\npainted ourselves into a corner with git rebase -i squash and fixup\nmessages, which will insert comments themselves.\n\nStill *maybe* we could handle this better for the common case. E.g. if\nwe're *not* inside a rebase only ignore the continuous and unbroken\nlines starting with # at the bottom. But that'd probably break\nsomething I'm not thinking of.\n"},{"id":"149892","messageId":"AANLkTinTxFveiuJvCUyB5Hghj-Jy+=LfhPJhtW1UYkSH@mail.gmail.com","threadId":"24978","inReplyTo":"AANLkTimgt6kjTkc+gxyOmTz03bdnfiRzgt4p8vymQ=VY@mail.gmail.com","subject":"Re: Could #-ignoring in commit message be smarter?","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-09-04T22:30:01Z","receivedAt":"2010-09-04T22:30:01Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Sat, Sep 4, 2010 at 17:24, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n> Where I'm referencing the #-character in the commit message itself for\n> some reason, and due to word wrapping it just *happens* to end up at\n> the start of a line. So the commit message silently becomes:\n\nIsn't this rare enough that it's not really a problem? I mean, sure,\nwhen it happens it's a PITA, but it's about as painful as doing `git\ncommit -m \"Yay, it works!\"` and having bash history magic blow it\naway. After a while you get used to it and either remember to escape\nthe bang, or not use it?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"149895","messageId":"AANLkTinRE9tLBxCXApvJ9dM9cAUVAAcAWn-N1AkW-bVz@mail.gmail.com","threadId":"24978","inReplyTo":"AANLkTinTxFveiuJvCUyB5Hghj-Jy+=LfhPJhtW1UYkSH@mail.gmail.com","subject":"Re: Could #-ignoring in commit message be smarter?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-04T22:44:51Z","receivedAt":"2010-09-04T22:44:51Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Sat, Sep 4, 2010 at 22:30, Sverre Rabbelier <srabbelier@gmail.com> wrote:\n> Heya,\n>\n> On Sat, Sep 4, 2010 at 17:24, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n>> Where I'm referencing the #-character in the commit message itself for\n>> some reason, and due to word wrapping it just *happens* to end up at\n>> the start of a line. So the commit message silently becomes:\n>\n> Isn't this rare enough that it's not really a problem? I mean, sure,\n> when it happens it's a PITA, but it's about as painful as doing `git\n> commit -m \"Yay, it works!\"` and having bash history magic blow it\n> away. After a while you get used to it and either remember to escape\n> the bang, or not use it?\n\nWith the bash thing you *notice* it, but in most cases like these what\nyou actually do is *not* notice it, then scratch your head a month\nlater at a commit message that makes no sense.\n\nAnyway, it's obviously not a huge issue since we don't have people\ncomplaining about it more often. But it's really annoying when it\nhappens.\n"}]}