Skip to content

git-spice tracks local main instead of origin/main #923

@jkanywhere

Description

@jkanywhere

I would like git-spice to be smarter about comparing to origin/main instead of my local main branch because local main is not always up-to-date.

Very possible I've misconfigured git-spice, or missed an important step of the flow. Advice is appreciated, thank you.

Steps to reproduce:
I'm using GitHub and git-spice 0.19.0.

  1. create a stack. For example:
❯ gs log long
  ┏━■ branch-2-bar ◀
  ┃   cbc5e11 fantastic feature (19 hours ago)
┏━┻□ branch-1-foo
┃    a8b8e11 beautiful bugfix(40 minutes ago)
main
  1. git checkout branch-2-bar Be on top of the stack
  2. Run git fetch to get the latest origin/main. At this point my local main branch is behind origin/main.
  3. Run gs stack submit.

Expected behavior:
Pull requests are created for branch-1-foo and branch-2-bar only.

Actual behavior:
git-spice starts to submit changes by describing commits that are already in origin/main but not my local main.

The proposed PR title comes from a commit on origin/main

❯ gs stack submit
Title: thing done and landed by a colleague (#12345)

so does the proposed PR body.

After I edit the proposed title and body then the commits and files changed in the created PR accurately reflects the commits on each branch.

This could therefore be a problem only with the guessed title and body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions