Skip to content

gx sync silently no-ops when local parent is stale relative to origin #4

@osaroadade

Description

@osaroadade

After a parent PR merges on origin, running gx sync on a downstream branch without first pulling the parent locally rebases onto the stale local ref and reports success — the merged changes never make it into the branch.

Reproduce:

  1. Stack B on A, merge A's PR into dev on GitHub.
  2. Without running git fetch or git pull, switch to B and run gx sync.
  3. Output: OK Rebased B / OK Pushed B / Stack sync complete.
  4. git log shows the merged parent commits are absent from B.

Expected:

Either auto-fetch the parent's upstream (might be too opinionated), or abort with a warning when git rev-list --count ..origin/ > 0.

Actual:

Silent rebase onto stale tip with a success message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions