mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-04-24 20:56:17 +02:00
58309b02a9
Git's --grep option uses Basic Regular Expression syntax by default, which means that the `[^\n]*` didn't do what was intended; it means "any character except `\` or the literal letter `n`" — not "any character except newline." Besides, `^` matched any line start, not only the start of the entire message, so "any character except newline" would have been wrong anyway. Given this, the script matched commits that have WIP or DROPME in the body, which is not what we want. (The last commit of this branch is an example for that.) Fix this by listing only the subject lines and grepping them outside of git; this also lets us use a slightly simpler regex (we want to match WIP anywhere in the subject).