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

Re: [PATCH] git-gui - use git-hook, honor core.hooksPath

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Sep 20, 2023, 15:30 UTC
Message-ID
<573c6dc5-2102-cb65-8f71-dea37fff0c9b@gmail.com>
In-Reply-To
<mafs01qetq9kk.fsf@yadavpratyush.com>
On 9/20/23 09:05, Pratyush Yadav wrote:
Show 9 quoted lines
> In the past, git-gui has tried to keep backward compatibility with all
> versions of Git, not just the latest ones. v2.36 is relatively new and
> this code would not work for anyone using an older version of Git.
>
> I have largely followed this practice for all the code I have written
> but I am not sure if it is a good idea to insist on it -- especially if
> it would end up adding some more complexity. I would be interested to
> hear what other people think about this.
>

I am not aware of any distribution (Linux, g4w, Mac) shipping anything except the git-gui in Junio's tree, which is specific to the git-core version, and the git-gui packages require (or are a part of) the same version git-core package: no cross-version compatibility of git components is assumed. Certainly, folks rolling their own can pull from upstream git-gui, but they take the risk of incompatibility with an outdated git. Other tools in Junio's tree have already made the switch to git-hook (send-email, git-p4) even though they are usually packaged separately from git-core, but also version locked to matching git-core.

Updating git-gui's hook execution to match git internals would be more complex than what I implemented or what was there before.  For instance, I never looked at what git-hook's g4w compatibility code uses to test if a hook is present and executable, it wouldn't surprise me to find git-gui was missing something there, but who wants to bother? Also, the commit language surrounding addition of git-hook is strongly suggestive of other changes in configuration coming, meaning more changes to hook execution code would be needed that are avoided by using git-hook. Note: I have one more patch to send, removing yet another work-around for early Cygwin tcl/tk, as more evidence of how many years it takes to clean some of this stuff out and the difficulty of keeping git-gui up to date.

I had considered the above when creating the patch, and I believe what I did is the right approach.

Mark
Previous: Pratyush YadavNext: Junio C Hamano
Message 16 of 25 in “BUG: git-gui no longer executes hook scripts”
  1. Mark LevedahlSep 15, 2023
  2. Junio C HamanoSep 15, 2023
  3. Junio C HamanoSep 15, 2023
  4. Mark LevedahlSep 15, 2023
  5. git-gui - re-enable use of hook scriptsMark Levedahl, Sep 16, 2023
  6. Junio C HamanoSep 16, 2023
  7. git-gui - re-enable use of hook scriptsMark Levedahl, Sep 16, 2023
  8. Junio C HamanoSep 16, 2023
  9. Mark LevedahlSep 17, 2023
  10. git-gui - use git-hook, honor core.hooksPathMark Levedahl, Sep 17, 2023
  11. Johannes SchindelinSep 18, 2023
  12. Junio C HamanoSep 18, 2023
  13. Mark LevedahlSep 18, 2023
  14. Junio C HamanoSep 18, 2023
  15. Pratyush YadavSep 20, 2023
  16. Mark LevedahlSep 20, 2023
  17. Junio C HamanoSep 20, 2023
  18. Junio C HamanoSep 20, 2023
  19. Johannes SchindelinSep 18, 2023
  20. Junio C HamanoSep 18, 2023
  21. Pratyush YadavSep 20, 2023
  22. Junio C HamanoSep 16, 2023
  23. Mark LevedahlSep 16, 2023
  24. Mark LevedahlSep 16, 2023
  25. Junio C HamanoSep 16, 2023

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.