gitbutlerapp/gitbutler

`mergiraf` merge driver seems to fail with exit code 256

Open

#10509 opened on Sep 30, 2025

View on GitHub
 (13 comments) (1 reaction) (1 assignee)Rust (19,787 stars) (862 forks)batch import
bugfeedback requestedhelp wanted🦀gitoxide🦀

Description

Originally on Discord.

Caused by:
    External merge driver failed with non-zero exit status ExitStatus(unix_wait_status(256)): GIT_DIR="/redacted-2/.git" GIT_WORK_TREE="/redacted-2" "/bin/sh" "-c" "mergiraf merge --git /redacted/.tmpeCLIAS /redacted/.tmp9grGSk /redacted/.tmppgWPKA -s \'\' -x \'\' -y \'\' -p \'work-ui/static/js/components/Header.tsx\' -l 7" "--"

The underlying configuration is:

[merge "mergiraf"]
    name = mergiraf
    driver = mergiraf merge --git %O %A %B -s %S -x %X -y %Y -p %P -l %L

It's unclear why it fails with exit status 256 at this time.

It's working in another clone, so it seems to be related to the mixup of the worktree directory, here /redacted-2 vs /redacted for tempfiles.

As a matter of fact, it appears to always create tempfiles in the /redacted directory, which usually leads to the failure.

The tempfiles are created from the CWD which is the reason for the sticky /redacted folder.

We know the merge driver process could be executed. And we know that it would provide stderr to the enclosing terminal.

Contributor guide