gitbutlerapp/gitbutler

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

Open

#10 509 ouverte le 30 sept. 2025

Voir sur GitHub
 (13 commentaires) (1 réaction) (1 assigné)Rust (862 forks)batch import
bugfeedback requestedhelp wanted🦀gitoxide🦀

Métriques du dépôt

Stars
 (19 787 stars)
Métriques de merge PR
 (Merge moyen 14h 43m) (446 PRs mergées en 30 j)

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.

Guide contributeur