Some months ago I mentioned a bug with git merge d...
# report-bugs
c
Some months ago I mentioned a bug with git merge drivers. What I found was that if a merge driver is installed and executed during a
restack
, any output to STDOUT will befoul things and the CLI will fail with an exception:
Copy code
UNCAUGHT EXCEPTION: Command failed with error exit code 128:
git commit-tree Staging resolved package-lock.json...
ad163b25b784a7f22cf3b9b4faf39b7aead6e317 -p b1a3c558d3bf039190dd37e49e7f762c2044635c -m feat(types): create @lavamoat/types

# Conflicts:
#	package-lock.json -S

fatal: not a valid object name Staging resolved package-lock.json...
ad163b25b784a7f22cf3b9b4faf39b7aead6e317

UNCAUGHT EXCEPTION: CommandFailed: Command failed with error exit code 128:
git commit-tree Staging resolved package-lock.json...
ad163b25b784a7f22cf3b9b4faf39b7aead6e317 -p b1a3c558d3bf039190dd37e49e7f762c2044635c -m feat(types): create @lavamoat/types

# Conflicts:
#	package-lock.json -S

fatal: not a valid object name Staging resolved package-lock.json...
ad163b25b784a7f22cf3b9b4faf39b7aead6e317

    at ChildProcess.<anonymous> (/opt/homebrew/Cellar/nvm/0.40.3/versions/node/v22.15.0/lib/node_modules/@withgraphite/graphite-cli/graphite.js:3:1237542)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1101:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5)
In the above,
Staging resolved package-lock.json...
is printed to STDOUT, which causes this exception to be thrown. A workaround is to only print to STDERR within a merge driver.
p
(If applicable) To help us repro, please send the following if you haven't already: - PR links, screenshots, and/or debug output if applicable - Repro steps - Does this happen consistently? Just to you or others on your team also? - Is this a regression? Is the problem new? - If you're having an issue with the CLI, please send us debug logs using
gt feedback --with-debug-context <any message>
hey Christopher, thanks for circling back to let us know!