Skip to content

Wrong commit is focused after moving a commit past a branch boundary #4040

@slieschke

Description

@slieschke

Describe the bug
Using rebase.updateRefs set to true in Git config, when moving a commit past a branch boundary the focused commit changes.

To Reproduce
Steps to reproduce the behavior:

  1. Starting from the Git state in the screenshot below, add a new commit with summary Part 1, Commit 3
  2. Focus the commit in the Commits panel and use to move the commit down twice. The commit is now located between Part 2, Commit 1 and Part 1, Commit 2 at the HEAD of the feature/part-1 branch.

Expected behavior
The Part 1, Commit 3 commit remains focused in the Commits panel.

Actual behavior
The Part 1, Commit 2 commit is now focused in the Commits panel.

Moving a commit up past a branch boundary with also results in the focused commit unexpectedly changing.

Screenshots
CleanShot 2024-11-05 at 15 15 02@2x

Version info:
commit=, build date=, build source=homebrew, version=0.44.1, os=darwin, arch=arm64, git version=2.47.0
git version 2.47.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions