#22476·desktop

`post-merge` hook does not appear to run in UI

Author: etherangerCreated Jul 3, 2026Updated Sep 28, 2026
Labelsbugpriority-3

The problem

I have hooks set up in post-merge and post-checkout to update a workspace based on new files arriving. It's good to know when it succeeds, but vital to know when it fails (basically an inconsistent workspace).

The dialog shows up when switching between branches (though only on failure, fair enough). But it doesn't show up from pull or merge or update from master

As a trivial example, this hook does seem to run in the background, but there's no evidence of it failing to the end user:

#!/bin/sh
echo "Simulated error state"
echo "Bad data" > record.txt
exit 1

Release version

Version 3.6.2 (x64)

Operating system

Windows 10

Steps to reproduce the behavior

  1. Be on a local branch at least one commit behind its remote tracking branch.
Image
  1. add a hook that will exit nonzero to .git/hooks/post-merge:
#!/bin/sh
echo "Hook running"
echo "Hook ran" > record.txt
exit 1
  1. Press the Pull origin button.

  2. Note that the script ran (record.txt has been added to the workspace) but there was no UI warning of failure.

  3. To compare, copy the above hook to .git/hooks/post-checkout, then switch branches.

  4. Note that on switch, the UI does appear.

Image

Log files

2026-07-03.desktop.production.log

Screenshots

No response

Additional context

No response