Skip to content

Conversation

@Byron
Copy link
Collaborator

@Byron Byron commented Apr 4, 2025

As follow-up to #7952, this PR is another attempt at fixing it.
Whereas #7952 applies a fix as post-process, let's try again and see if this can be correct from the start.

Tasks

  • reproduction with additional debugging
    • From what we found out in our session with @krlvi, the integration commit as passed to the commit-engine already only has a single parent. If it had not, it would loudly fail with an error
      as the base_substitute must be set.
  • add test (with respective virtual-branches state)
  • fix it by detecting the case that not all heads are yet represented in the worktree commit, and rewrite the workspace commit to have it, then use the rebase engine as normal which does a proper merge.
    • make sure that failures don't actually make any change (probably automatic as no ref-rewrites would happen then)
  • double-check situation in the UI works as well, without the fix.

The Problem

To reproduce the bug (with the previous fix unapplied), one has to be in a state where a new branch has been created, and now we attempt to create a new commit that new branch.

2025-04-04 18:05 +0800 GitButler         o [gitbutler/workspace] GitButler Workspace Commit
2025-04-04 18:04 +0800 Sebastian Thiel   o [dependent] [refs/gitbutler/Lane-4] left branch change
2025-03-26 14:25 +0800 Sebastian Thiel   o selection
2025-03-25 16:24 +0800 Sebastian Thiel   o some data for file
2025-03-25 10:01 +0800 Sebastian Thiel   o binary
2025-03-12 09:55 +0800 Sebastian Thiel   o tar added
2025-03-12 09:55 +0800 Sebastian Thiel   o edited in UI
2025-03-12 09:55 +0800 Sebastian Thiel   o [below-dependent] {origin/below-dependent} top commit
2025-02-25 20:31 +0100 Sebastian Thiel   o below middle below top
2025-02-27 19:56 +0100 Sebastian Thiel   o at A
2025-02-27 19:56 +0100 Sebastian Thiel   o below A
2025-02-27 19:56 +0100 Sebastian Thiel   o 2
2025-02-27 19:56 +0100 Sebastian Thiel   o 1
2025-02-24 18:53 +0100 Sebastian Thiel   o [new-branch] {origin/master} nested file

The current implementation isn't able to deal with that as it expect any head that is part of the worktree to already be merged into the worktree commit.

@vercel
Copy link

vercel bot commented Apr 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2025 1:17pm

@vercel vercel bot temporarily deployed to Preview – gitbutler-components April 4, 2025 09:46 Inactive
@vercel
Copy link

vercel bot commented Apr 4, 2025

@Byron is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

@Byron Byron marked this pull request as ready for review April 5, 2025 13:17
@Byron Byron enabled auto-merge April 5, 2025 13:17
@Byron Byron merged commit dee5372 into gitbutlerapp:master Apr 5, 2025
18 of 19 checks passed
@Byron Byron deleted the fix-7952 branch April 5, 2025 13:23
krlvi added a commit that referenced this pull request Apr 8, 2025
This reverts commit dee5372, reversing
changes made to 4cde459.
krlvi added a commit that referenced this pull request Apr 8, 2025
Revert "Merge pull request #7976 from Byron/fix-7952"
@Byron Byron mentioned this pull request Apr 28, 2025
4 tasks
Byron added a commit that referenced this pull request Apr 28, 2025
- support for `GIT COMMITTER_DATE` overrides
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant