-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Base branch: Safely handle divergence #4899
Draft
estib-vega
wants to merge
7
commits into
master
Choose a base branch
from
base-branch-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+587
−59
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
github-actions
bot
added
rust
Pull requests that update Rust code
@gitbutler/desktop
labels
Sep 12, 2024
estib-vega
force-pushed
the
base-branch-improvements
branch
2 times, most recently
from
September 13, 2024 08:10
ba3329e
to
901e225
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 13, 2024 10:31
b72085e
to
2a4bbef
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 13, 2024 10:33
2a4bbef
to
624e5c3
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 13, 2024 12:58
1ef2625
to
5de527d
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 13, 2024 13:56
7755dfd
to
e08fdd2
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 13, 2024 14:58
e08fdd2
to
b3da0b7
Compare
estib-vega
changed the title
base-branch-improvements
Base branch: Safely handle divergence
Sep 13, 2024
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 13, 2024 15:31
b3da0b7
to
72d0050
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 15, 2024 07:59
72d0050
to
bb09576
Compare
Lets separate out the update of base branch (because we can in the future show exactly what is gonna happen to branches) |
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 16, 2024 15:46
bd6393e
to
935dd4a
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 23, 2024 13:43
7c45c36
to
29e8a71
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 23, 2024 13:56
cc70c46
to
7de64e7
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 23, 2024 14:59
2fea1c9
to
c495f1e
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 23, 2024 15:29
c495f1e
to
053ec26
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 23, 2024 15:53
053ec26
to
fe4076c
Compare
Byron
reviewed
Sep 24, 2024
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 24, 2024 07:40
a3b8c55
to
53ed0bd
Compare
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 24, 2024 11:54
53ed0bd
to
0b18d99
Compare
Determine whether the local target has diverged from the remote, and return some information about that
If the local target has diverged from the remote target, display that to the user as a warning Only show either the divergence warning or upstream count BaseBranch: Use runes BaseBranch: Display the branch graph In order to make it a bit clearer what the divergence state of the base branch is. reuse the line graphs to display it BaseBranch divergence: Add a confirmation modal
If needed, the base branch can be pushed or force pushed
Only display the warnings and confirmation modals when actual changes can get lost (resting to local or remote). Otherwise, display less scary notifications and let the user push if needed Merge remote-tracking branch 'origin/master' into base-branch-improvements
Depending on which action the user chooses, and whether they've set certain flags, act accordingly
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 24, 2024 13:18
0b18d99
to
45cb933
Compare
Add a method to determine which should be the new base branch target commit ID based on what resolution approach is selected
estib-vega
force-pushed
the
base-branch-improvements
branch
from
September 24, 2024 15:16
dda217e
to
7c7ba3d
Compare
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
☕️ Reasoning
The application doesn't display any kind of information related to base branch divergence.
It should detect this, raise this to the user and present alternative actions to address this.
Scenario
Expected behavior would be to have some information about this and the ability to restore the application to the latest version of the target upstream.
🧢 Changes
Visuals
Local is ahead of upstream
In this state, gitbutler/workspace is ahead of the target upstream.
The information is presented to the user as a heads-up only, as they might want to push the changes,
If they want to reset their local target branch to the current state of the target upstream, they will be prompted with a confirmation modal.
Local has changes ahead and behind upstream
Similar to the previous state, there are some local commits that are not in the remote, but also some remote changes that are not in the local branch.
The information is displayed as a warning.
The options are to hard reset to the fork-point, or force-push.
Both buttons trigger confirmation dialogues.
Confirmation dialogue when resetting to the fork-point
Confirmation dialogue when force-pushing the local changes to the remote