git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG REPORT] git-gui invokes prepare-commit-msg hook incorrectly

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 5, 2024, 19:57 UTC
Message-ID
<CAPig+cRQPrtGBTxM49nUeHvsVr0qEOnKZ5W_4by=A9mXEsR3DA@mail.gmail.com>
In-Reply-To
<17df67804ef7a3c8.df629cdadcf4ea15.524a056283063601@EPIC94403>
[cc: +j6t]
On Fri, Jul 5, 2024 at 3:23 PM brianmlyles <brianmlyles@gmail.com> wrote:
Show 12 quoted lines
> I noticed that commits from certain users were ending up in our
> repository with comment-like lines in the commit message. [...]
> [...]
> This seems like a bug in git-gui. I see two fixes, but I'm not sure
> which is more correct:
> [...]
> - Have git-gui create the commit in a way that causes the message to be
>   washed
>
> The latter seems like it would be more consistent with other workflows
> where the user is seeing the message in an editor, so my instinct is
> that it would be the better fix.

A patch to make git-gui strip comment lines had been previously applied[1,2], however, it badly broke git-gui when running with old Tcl versions, such as on macOS[3,4]. The breakage was not insurmountable, and a patch[5,6] was submitted to resolve it. Unfortunately, the then-maintainer of git-gui lost interest in the project about that point, thus left the issue hanging. Thus, to this day, git-gui still doesn't strip comment lines.

Resurrecting these patches would be one way forward, assuming the new git-gui maintainer[7] (who is Cc:'d) would be interested.

[1]: v2: https://lore.kernel.org/git/20210218181937.83419-1-me@yadavpratyush.com/ [2]: v1: https://lore.kernel.org/git/20210202200301.44282-1-me@yadavpratyush.com/ [3]: https://lore.kernel.org/git/CAPig+cT-sfgMDi9-6AEKF85NtOiXeqddJjk-pYuhDtTVAE-UEw@mail.gmail.com/ [4]: https://lore.kernel.org/git/CAPig+cSC8uNfoAjDKdBNheod9_0-pCD-K_2kwt+J8USnoyQ7Aw@mail.gmail.com/ [5]: https://lore.kernel.org/git/20210228231110.24076-1-sunshine@sunshineco.com/ [6]: https://lore.kernel.org/git/CAPig+cRQN4PjfxEOZ8ZBA_uttsRPS8DPDgToM_JFvichDDh_HQ@mail.gmail.com/ [7]: https://lore.kernel.org/git/0241021e-0b17-4031-ad9f-8abe8e0c0097@kdbg.org/

Previous: brianmlylesNext: Sean Allred
Message 2 of 10 in “[BUG REPORT] git-gui invokes prepare-commit-msg hook incorrectly”
  1. brianmlylesJul 5, 2024
  2. Eric SunshineJul 5, 2024
  3. Sean AllredJul 5, 2024
  4. Eric SunshineJul 5, 2024
  5. Johannes SixtJul 6, 2024
  6. Junio C HamanoJul 6, 2024
  7. Johannes SixtJul 7, 2024
  8. Brian LylesJul 8, 2024
  9. Johannes SixtJul 8, 2024
  10. Oswald BuddenhagenAug 7, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.