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

Re: git-gui: Visualize * History does nothing on macOS

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 9, 2024, 19:05 UTC
Message-ID
<CAPig+cS1o5bqK2Ph1fFt2wi6QaOO2=83xwoqoTLifA6z3NssXA@mail.gmail.com>
In-Reply-To
<38A18180-3CC9-411B-B5D3-36C5C32B6EE9@gmail.com>
On Thu, May 9, 2024 at 2:17 PM Ilya Kulakov <kulakov.ilya@gmail.com> wrote:
Show 8 quoted lines
> Both "Visualize <branch>'s History" and "Visualize All Branch History" do nothing on macOS. In the terminal it logs:
>
> Error in startup script: 58:103: execution error: Not authorized to send Apple events to System Events. (-1743)
> "if {[tk windowingsystem] eq "aqua"} {
>     exec osascript -e [format {
>         tell application "System Events"
>             set frontmost of processes ..."
>     (file "/opt/homebrew/bin/gitk" line 12321)
The above is reporting that the problem is in the `gitk` script...
> The relevant code at https://github.com/git/git/blob/0f3415f1f8478b05e64db11eb8aaa2915e48fef6/git-gui/git-gui.sh#L271-L279 should not be fatal, because the permission to access "System Events" and arbitrarily manipulate windows is optional.

... but the code you cited here is the git-gui script, which does not experience the same problem because a `catch` block is wrapped around the `exec osascript` invocation.

A patch to fix this problem in `gitk` was posted[1] in 2018 but never got picked up since the `gitk` maintainer seems to have disappeared. Considering that the patch is still relevant, perhaps it might make sense for Junio to pick it up himself and apply it to the Git tree(?).

[1]: https://lore.kernel.org/git/20180724065120.7664-1-sunshine@sunshineco.com/
Previous: Ilya KulakovNext: Stefan Haller
Message 2 of 6 in “git-gui: Visualize * History does nothing on macOS”
  1. Ilya KulakovMay 9, 2024
  2. Eric SunshineMay 9, 2024
  3. Stefan HallerJun 20, 2024
  4. Eric SunshineJun 21, 2024
  5. Stefan HallerJun 21, 2024
  6. Johannes SixtJun 22, 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.