{"thread":{"id":"61447","subject":"git-gui: Visualize * History does nothing on macOS","startedAt":"2024-05-09T18:17:32Z","lastAt":"2024-06-22T07:13:40Z","messageCount":6,"participants":["Ilya Kulakov","Eric Sunshine","Stefan Haller","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"494374","messageId":"38A18180-3CC9-411B-B5D3-36C5C32B6EE9@gmail.com","threadId":"61447","inReplyTo":null,"subject":"git-gui: Visualize * History does nothing on macOS","fromName":"Ilya Kulakov","fromEmail":"kulakov.ilya@gmail.com","sentAt":"2024-05-09T18:17:19Z","receivedAt":"2024-05-09T18:17:32Z","isPatch":false,"sender":{"key":"kulakov.ilya@gmail.com","avatar":null},"body":"Both \"Visualize <branch>'s History\" and \"Visualize All Branch History\" do nothing on macOS. In the terminal it logs:\n\nError in startup script: 58:103: execution error: Not authorized to send Apple events to System Events. (-1743)\n    while executing\n\"exec osascript -e [format {\n        tell application \"System Events\"\n            set frontmost of processes whose unix id is %d to true\n        end te...\"\n    invoked from within\n\"if {[tk windowingsystem] eq \"aqua\"} {\n    exec osascript -e [format {\n        tell application \"System Events\"\n            set frontmost of processes ...\"\n    (file \"/opt/homebrew/bin/gitk\" line 12321)\n\nThe 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.\n\n\nBest Regards,\nIlya Kulakov\n\n"},{"id":"494375","messageId":"CAPig+cS1o5bqK2Ph1fFt2wi6QaOO2=83xwoqoTLifA6z3NssXA@mail.gmail.com","threadId":"61447","inReplyTo":"38A18180-3CC9-411B-B5D3-36C5C32B6EE9@gmail.com","subject":"Re: git-gui: Visualize * History does nothing on macOS","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-05-09T19:05:14Z","receivedAt":"2024-05-09T19:05:30Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, May 9, 2024 at 2:17 PM Ilya Kulakov <kulakov.ilya@gmail.com> wrote:\n> Both \"Visualize <branch>'s History\" and \"Visualize All Branch History\" do nothing on macOS. In the terminal it logs:\n>\n> Error in startup script: 58:103: execution error: Not authorized to send Apple events to System Events. (-1743)\n> \"if {[tk windowingsystem] eq \"aqua\"} {\n>     exec osascript -e [format {\n>         tell application \"System Events\"\n>             set frontmost of processes ...\"\n>     (file \"/opt/homebrew/bin/gitk\" line 12321)\n\nThe above is reporting that the problem is in the `gitk` script...\n\n> 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.\n\n... but the code you cited here is the git-gui script, which does not\nexperience the same problem because a `catch` block is wrapped around\nthe `exec osascript` invocation.\n\nA patch to fix this problem in `gitk` was posted[1] in 2018 but never\ngot picked up since the `gitk` maintainer seems to have disappeared.\nConsidering that the patch is still relevant, perhaps it might make\nsense for Junio to pick it up himself and apply it to the Git tree(?).\n\n[1]: https://lore.kernel.org/git/20180724065120.7664-1-sunshine@sunshineco.com/\n"},{"id":"497402","messageId":"41408b88-2938-4112-a02c-53876e20f5b1@haller-berlin.de","threadId":"61447","inReplyTo":"CAPig+cS1o5bqK2Ph1fFt2wi6QaOO2=83xwoqoTLifA6z3NssXA@mail.gmail.com","subject":"Re: git-gui: Visualize * History does nothing on macOS","fromName":"Stefan Haller","fromEmail":"lists@haller-berlin.de","sentAt":"2024-06-20T14:40:15Z","receivedAt":"2024-06-20T14:40:18Z","isPatch":false,"sender":{"key":"lists@haller-berlin.de","avatar":null},"body":"On 09.05.24 21:05, Eric Sunshine wrote:\n> A patch to fix this problem in `gitk` was posted[1] in 2018 but never\n> got picked up since the `gitk` maintainer seems to have disappeared.\n> Considering that the patch is still relevant, perhaps it might make\n> sense for Junio to pick it up himself and apply it to the Git tree(?).\n> \n> [1]: https://lore.kernel.org/git/20180724065120.7664-1-sunshine@sunshineco.com/\n\nWhether the patch is still relevant depends on which versions of Tcl/Tk\nwe are supporting. On recent versions, the whole AppleScript business is\nno longer necessary, windows come to the front correctly without it. So\na better patch might be to remove the osascript call entirely.\n\nIn my locally patched version of gitk I did that long ago. I don't\nremember which version of Tcl/Tk I was running back then, but my patch\nthat removes the code is from October 2020.\n\n-Stefan\n"},{"id":"497448","messageId":"CAPig+cTaBxoJbsVsZLYLZueZpSkmt2zRJzgE=HOO30FvxpUUnA@mail.gmail.com","threadId":"61447","inReplyTo":"41408b88-2938-4112-a02c-53876e20f5b1@haller-berlin.de","subject":"Re: git-gui: Visualize * History does nothing on macOS","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2024-06-21T04:35:20Z","receivedAt":"2024-06-21T04:35:31Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Jun 20, 2024 at 10:40 AM Stefan Haller <lists@haller-berlin.de> wrote:\n> On 09.05.24 21:05, Eric Sunshine wrote:\n> > A patch to fix this problem in `gitk` was posted[1] in 2018 but never\n> > got picked up since the `gitk` maintainer seems to have disappeared.\n> > Considering that the patch is still relevant, perhaps it might make\n> > sense for Junio to pick it up himself and apply it to the Git tree(?).\n> >\n> > [1]: https://lore.kernel.org/git/20180724065120.7664-1-sunshine@sunshineco.com/\n>\n> Whether the patch is still relevant depends on which versions of Tcl/Tk\n> we are supporting. On recent versions, the whole AppleScript business is\n> no longer necessary, windows come to the front correctly without it. So\n> a better patch might be to remove the osascript call entirely.\n\nThat's a possibility, though it abandons users stuck on older systems\n(which may not be a big deal since it's only a minor annoyance if the\nGitk window doesn't come to the foreground).\n\nUnfortunately, it seems unlikely that either my 2018 patch or your\nsuggestion will be applied since the Gitk maintainer seems to have\ndisappeared(?)[*].\n\n[*] Interestingly, I just checked git://ozlabs.org/~paulus/gitk and\nnoticed that changes were applied as recently as 2022-02-20, however,\nthe patch I submitted was not one of them.\n"},{"id":"497463","messageId":"8fcf1aa4-6c80-4d66-ba95-0cbbfd67540a@haller-berlin.de","threadId":"61447","inReplyTo":"CAPig+cTaBxoJbsVsZLYLZueZpSkmt2zRJzgE=HOO30FvxpUUnA@mail.gmail.com","subject":"Re: git-gui: Visualize * History does nothing on macOS","fromName":"Stefan Haller","fromEmail":"lists@haller-berlin.de","sentAt":"2024-06-21T06:12:51Z","receivedAt":"2024-06-21T06:12:54Z","isPatch":false,"sender":{"key":"lists@haller-berlin.de","avatar":null},"body":"On 21.06.24 06:35, Eric Sunshine wrote:\n> Unfortunately, it seems unlikely that either my 2018 patch or your\n> suggestion will be applied since the Gitk maintainer seems to have\n> disappeared(?)[*].\n> \n> [*] Interestingly, I just checked git://ozlabs.org/~paulus/gitk and\n> noticed that changes were applied as recently as 2022-02-20, however,\n> the patch I submitted was not one of them.\n\nIn 2022, Paul said [1] that he would be willing to pass maintainership\nto somebody else. Johannes, now that you volunteered to take on git-gui,\ncould you imagine doing the same for gitk? This would be awesome.\n\n-Stefan\n\n\n[1] https://public-inbox.org/git/YntxL%2FfTplFm8lr6@cleo/\n"},{"id":"497538","messageId":"22755bd4-7219-49e4-9e8f-ac9663291fcd@kdbg.org","threadId":"61447","inReplyTo":"8fcf1aa4-6c80-4d66-ba95-0cbbfd67540a@haller-berlin.de","subject":"Re: git-gui: Visualize * History does nothing on macOS","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2024-06-22T07:13:30Z","receivedAt":"2024-06-22T07:13:40Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 21.06.24 um 08:12 schrieb Stefan Haller:\n> In 2022, Paul said [1] that he would be willing to pass maintainership\n> to somebody else. Johannes, now that you volunteered to take on git-gui,\n> could you imagine doing the same for gitk? This would be awesome.\n\nI can imagine it, but I'm not yet offering to do so, since I haven't\neven evolved a git-gui workflow.\n\n-- Hannes\n\n"}]}