gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
12.35k stars 483 forks source link

Unexpected behavior on integrate upstream #4352

Open PavelLaptev opened 1 month ago

PavelLaptev commented 1 month ago

Version

nightly/0.5.601

Operating System

Mac OS X

Distribution Method

dmg (Apple Silicon)

Describe the issue

There is a branch with local-only or remote and local commits. If someone else contributed to this branch, we will see the upstream commits (orange line).

image

If I click Integrate upstream, a local commit appears that duplicates the upstream, but the upstream commit stays. And if I click on the Integrate upstream button again, it will add another duplicated local commit.

image

Here is a video capture:

https://github.com/user-attachments/assets/11c57d37-a029-48e2-8788-b4116b1ad573

How to reproduce

  1. Create a new branch and push the branch and any commit to remote.
  2. Go to the repo on GitHub, edit any file and commit changes. Or ask someone else to contribute to the branch.
  3. Go to GitButler and click the update button. You should see now the upstream commits (orange line).
  4. Select and click the Integrate upstream option on the button dropdown.

Expected behavior

To me, the expected behavior would be to see the upstream commits after integration as local and remote commits (grey line).

image

See the video capture:

https://github.com/user-attachments/assets/6a579603-5654-4615-889f-175f449e6c54


cc @Caleb-T-Owens

Relevant log output

No response

Caleb-T-Owens commented 1 month ago

@PavelLaptev can you do a git cat-file -p <sha> on the sha of the remote commit