#16178·gitbutler

but resolve finish reports success while a submodule gitlink conflict is still unresolved, silently keeping one side

Author: HeruboyCreated Oct 1, 2026Updated Oct 1, 2026

Summary

but resolve finish exits 0 and reports success while a submodule gitlink conflict is still listed as unresolved, and silently keeps one side of the conflict.

Version / environment

  • GitButler CLI 0.22.3, Linux.
  • Reproduced in a throwaway repo (own HOME, nothing real touched). Superproject with one submodule sm (local bare remotes, protocol.file.allow=always), pinned at commit A. A real bare origin that moves.

Steps to reproduce

  1. Create a submodule remote with commits A (base), B (A->B) and C (A->C). Create a superproject origin and a clone with sm pinned at A. Run but setup.
  2. Stack s1: bump the gitlink A -> C and but commit -b s1 ....
  3. Upstream moves: push a commit to origin/main bumping the gitlink A -> B.
  4. but pull. Result: s1 - conflicted, commit marked [conflict].
  5. but resolve conflicts s1 prints, for sm: "Can only be resolved in edit mode (but resolve <commit>): The conflict is not a regular file."
  6. but resolve <commit>, then but resolve status: Conflicted files remaining: sm.
  7. Without any but resolve apply, run but resolve finish.

Expected

finish refuses (non-zero, naming sm as unresolved), or the tool offers a way to choose the gitlink side. Step 5 points the user at resolve apply, but a gitlink is not a regular file, so that guidance is not actionable.

Actual

but resolve finish exits 0 and prints "Conflict resolution finalized successfully! ... No conflict markers remain ... No conflicted commits remain." The commit's tree silently carries sm = C (the stack's own bump), with no user decision recorded. During the same step the checked-out sm/ directory went from 2 entries to 0.

Notes

  • Only one stack can touch the gitlink at a time (but commit -b s2 on the same gitlink was refused: "edits touch the same file"), so the conflict arises from an upstream pull, not from co-applied stacks.
  • Not controlled: I did not check whether sm/ also empties on a clean, non-conflicted checkout, so the emptying is an observation, not proven to be caused by finish.
  • A multi-stack variant was not needed to trigger this; the single-stack run alone reproduces it.

Related issues

  • #15613: edit-mode resolve finish rebuilds commits against their pre-pull base and silently records upstream deletions. Closest in spirit (finish silently records a wrong tree), but there is no gitlink involved and no acceptance of an unresolved conflict.
  • #15112: resolve finish fails with "Failed to merge bases while cherry picking" on a multi-stack workspace. Opposite symptom (error vs. false success).
  • #15127: commits already in the new base stay applied as "(no changes)" and can be handed over as conflicts. Different trigger.
  • #14507 (closed): but commit/amend silently dropped a staged submodule gitlink. Same area, different command.