gitq preflight
Predicts whether a sync would conflict, without changing anything.
Usage
bash
gitq preflight
Behavior
For each tracked stack, checks whether the working tree is dirty (untracked, staged, or unstaged, any of which blocks a rebase), then, unless it is dirty, runs one git merge-tree three-way merge per branch against its parent to predict conflicts (src/core/rebase-engine.ts:171,180). The human output is one line per stack, <stackName>: dirty=<bool>, followed by either the predicted conflicts (each conflicted file with its two-letter git status code) or no predicted conflicts.
preflightskips prediction entirely when the working tree is dirty.no predicted conflictsnext todirty=truemeans "not checked," not "clean."- It predicts against the tree as it is right now, one branch at a time. It cannot see a conflict that would only appear once an earlier branch in the same cascade has actually been rewritten, so a clean
preflightdoes not guarantee a cleansync. - When a stack branch is checked out in one of your worktrees, a
slot conflicts:section is appended naming the branch, the worktree, and whether that worktree is dirty, since a dirty checkout there is what will make a cascade refuse to move that branch. - Takes no flags beyond the global ones. Under
--json, each stack carries areport(the fullPreFlightReport:dirty,hasStagedChanges,conflictBranches,threadWarnings, anddriftWarnings) andslotConflicts, plus the sharedworktreesarray.driftWarnings, branches whose merged parent's tombstone is not in their ancestry, only surface under--json; the human output does not print them. See JSON output.
Exit codes
0: always, once the checks complete.preflighthas no refusal of its own.
See Exit codes for the general contract.
See also
- Reading the tree:
preflightin context, with a real run. - The cascade: what the reconciliation
driftWarningspoints at actually does. - Work slots and leases: what a slot conflict means.
gitq sync: the commandpreflightis checking before you run it.