Skip to content

[RBB] Merge changes into your branch #3998

Closed

Description

@nerdneha

This is part of #3956 and provides the option to bring changes from a target branch into your branch using a merge button

User Flow to check functionality:

  • click on compare tab, click into the "compare a branch..." input, and click on "master" and see:
    • Behind (x) in the toggle selected with the commits that are missing from your branch that exist in the target branch
    • a merge button saying Merge into my-branch-name
    • supporting text This will merge x commits from (target branch name)
  • click on Ahead (y) in the toggle where y is the # of commits your branch is ahead of "master" and see:
    • no merge button
  • click "x" in the branch input, select another target branch, and see:
    • the option to merge a different target branch's commits into your branch in the default behind view only
  • click back to Behind (x) and click on the merge button and see:
    • commits disappear from Behind area and toggle becomes Behind (0)
    • Ahead is not affected
  • click "x" in the branch input and focus out of the input and see:
    • the recently merged commits included in the history now

Changes:

  • merge button with text Merge into (my-branch-name)
  • supporting text below merge button with a count matching x in the Behind (x) toggle
  • clicked Merge into (my-branch-name) merges those changes into your branch
  • disabled merge button when there is nothing to merge (ex: after completing a merge)
  • reverting on conflict + error message

Other pieces:

Before (shows "ahead" by default):
screen shot 2018-02-08 at 2 11 27 am

After:
image

Activity

  1. nerdneha commented on Feb 13, 2018

    @nerdneha
    ContributorAuthor

    @donokuda @niik

    • what happens after you merge? do you stay in the view and the behind count becomes Behind (0) and the ahead stays Ahead (y)? what does the merge button look like (greyed out? hidden)?
    • is there a scenario where the merge button would be greyed out otherwise?
    • if they end up in a state where they have merge conflicts, will we have any (temporary) helpful text to resolve?
    • is there anything fancy we need to know about scrolling through commits in the "behind" part?
  2. added this to the milestone on Feb 13, 2018
  3. niik commented on Feb 13, 2018

    @niik
    Member

    what happens after you merge? do you stay in the view and the behind count becomes Behind (0) and the ahead becomes Ahead (x+y)?

    Yup, that makes sense to me

    what does the merge button look like (greyed out? hidden)?

    The normal button disabled state

    is there a scenario where the merge button would be greyed out otherwise?

    As long as there are commits ready to be merged I can't see such a case. Perhaps we'd disable it while a pull operation is ongoing but we don't do that for committing right now so we can probably punt on it for now.

    if they end up in a state where they have merge conflicts, will we have any (temporary) helpful text to resolve?

    We should show a dialog in that case letting the user know that the merge was unsuccessful and then send them of to the commit view to see the conflicts.

    is there anything fancy we need to know about scrolling through commits in the "behind" part?

    Not for the initial work but one thing that we both would really like to have in this view is range selections. We haven't yet spec:d that out fully though.

  4. changed the title [-]Merge changes into your branch[/-] [+][RBB] Merge changes into your branch[/+] on Mar 19, 2018
  5. iAmWillShepherd commented on Apr 4, 2018

    @iAmWillShepherd
    Contributor

    reverting on conflict + error message

    I'm a bit confused by this. Does this mean the app should auto-magically revert on conflict? or is it as simple as displaying an error stating there are conflicts?

  6. iAmWillShepherd commented on Apr 18, 2018

    @iAmWillShepherd
    Contributor

    @donokuda, @niik do you have any thoughts on how we should handle a merge conflict? Should we surface a dialog or show something in the Compare tab?

    At the moment, I'm leaning towards this workflow:

    1. Merge produces conflict
    2. User can get out of it by clicking discard all changes
    3. Check to see if the MERGE_HEAD file exists in the.git database
    4. If it does, use git merge --abort to cleanup things

    @shiftkey and I discussed this further and we're thinking it would be very useful to show a bit of UI that let's the user know they have an out.

  7. donokuda commented on Apr 18, 2018

    @donokuda
    Contributor

    That sounds reasonable to me, but would this be considered out of scope for RBB? I think users are currently able to find themselves in that situation if they get a conflict from running Branch > Update From Default Branch...

    Maybe we can punt on this decision until we start work on Merge Conflicts.

  8. locked as resolved and limited conversation to collaborators on Jul 17, 2018
  9. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions