Skip to content

Fix copiedFromRemoteId bug #4807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2024
Merged

Fix copiedFromRemoteId bug #4807

merged 1 commit into from
Sep 1, 2024

Conversation

mtsgrd
Copy link
Contributor

@mtsgrd mtsgrd commented Sep 1, 2024

  • correctly shows commits as rebased when changeId is missing
  • setting relatedTo is sufficient, no need to touch get status()

For testing I applied this branch by Pavel:
image

- correctly shows commits as rebased when changeId is missing
- setting relatedTo is sufficient, no need to touch `get status()`
@mtsgrd mtsgrd requested a review from Byron September 1, 2024 09:52
@mtsgrd mtsgrd enabled auto-merge (rebase) September 1, 2024 09:53
@mtsgrd mtsgrd disabled auto-merge September 1, 2024 11:05
@mtsgrd mtsgrd marked this pull request as draft September 1, 2024 11:05
@mtsgrd mtsgrd marked this pull request as ready for review September 1, 2024 11:14
@mtsgrd mtsgrd merged commit 98c3f5d into master Sep 1, 2024
12 checks passed
@mtsgrd mtsgrd deleted the Fix-copied-from-remote-id-bug branch September 1, 2024 12:33
(this.isRemote && (!this.relatedTo || this.id === this.relatedTo.id)) ||
(this.copiedFromRemoteId && this.relatedTo && this.copiedFromRemoteId === this.relatedTo.id)
)
if (this.isRemote && (!this.relatedTo || this.id === this.relatedTo.id))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful, less really is more!

I also tried my use-case again, which is to create a vbranch from another branch that has no change-ids in commits, and then undid one commit, and it also just works.

Screenshot 2024-09-01 at 18 57 19

I think what I wanted to accomplish is to have it show as Local and remote just as if change-ids were equal (or it's the same actual commit), but probably I misunderstood the state (or status) that such a copied commit is actually in.

And somewhat magically, it is all working even when the commit message is amended to the local commit.

@krlvi
Copy link
Member

krlvi commented Sep 2, 2024

@mtsgrd

I like this very much. Just want to note that this fixes the visuals on the workspace (1) but in the branch preview page (2) it's still borked.

(1)
image

(2)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants