Skip to content

propagate information to rebase conflicts dialog when pull fails - #6914

Merged
outofambit merged 2 commits into
developmentfrom
shiftkey/rebase/propagate-context-with-error
Feb 26, 2019
Merged

outofambit merged 2 commits into
developmentfrom
shiftkey/rebase/propagate-context-with-error

Conversation

@shiftkey

@shiftkey shiftkey commented Feb 21, 2019 •

Copy link
Copy Markdown
Member

Overview

Closes #6892

Description

This PR reviews the data that we provide to the error handlers when a pull fails, so we can either show the merge conflicts or rebase conflicts flow. The biggest change here is that we were passing in the tip (which might not be on a branch). I've replaced this with more explicit properties:

  • currentBranch is the one that the user is performing the git pull or git merge on
  • theirBranch is the other branch involved with the operation

For a merge, it should be the "other" branch. For a rebase, it should be the tracking branch.

I can't come up with a case where the user should be able to git pull or git merge from a detached HEAD or unknown tip, so I think we should just report an error if we're in an unexpected state, rather than attempt the operation.

  • testing with git pull --rebase to trigger conflicts

Release notes

Notes:

@shiftkey shiftkey added this to the 1.6.3 milestone Feb 21, 2019
@shiftkey
shiftkey force-pushed the shiftkey/rebase/detect-and-show-some-ui branch 2 times, most recently from 0ef1a50 to ba24e76 Compare February 22, 2019 17:02
@shiftkey
shiftkey force-pushed the shiftkey/rebase/propagate-context-with-error branch 2 times, most recently from 7f372a5 to 01ed530 Compare February 25, 2019 17:53
@shiftkey
shiftkey changed the base branch from shiftkey/rebase/detect-and-show-some-ui to development February 25, 2019 17:53
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 25, 2019
@shiftkey
shiftkey marked this pull request as ready for review February 25, 2019 17:56
@shiftkey
shiftkey force-pushed the shiftkey/rebase/propagate-context-with-error branch from 01ed530 to b2391fa Compare February 25, 2019 18:28

@outofambit outofambit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!

@outofambit outofambit self-assigned this Feb 25, 2019
@outofambit

Copy link
Copy Markdown
Contributor

i agree that throwing an error is a reasonable approach to invalid tips in this situation. i think it should be impossible to get in that situation with the current UI too, no?

@shiftkey

Copy link
Copy Markdown
Member Author

i think it should be impossible to get in that situation with the current UI too, no?

I agree, and if there is a case I want to hear about it, because we should only be doing merges and rebases against valid branches.

@outofambit
outofambit merged commit 00d6ad0 into development Feb 26, 2019
@outofambit
outofambit deleted the shiftkey/rebase/propagate-context-with-error branch February 26, 2019 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants