Skip to content

provide a better description when rebase in progress#6984

Merged
outofambit merged 1 commit intodevelopmentfrom
shiftkey/rebase/push-pull-description
Mar 4, 2019
Merged

provide a better description when rebase in progress#6984
outofambit merged 1 commit intodevelopmentfrom
shiftkey/rebase/push-pull-description

Conversation

@shiftkey
Copy link
Member

@shiftkey shiftkey commented Mar 1, 2019

Overview

Closes #6980

Description

This tweaks the push/pull button to avoid mentioning detached HEAD when a rebase is in progress:

screen shot 2019-03-01 at 7 44 12 am

Release notes

Notes: no-notes

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 1, 2019
@shiftkey shiftkey added this to the 1.6.3 milestone Mar 1, 2019
outofambit
outofambit previously approved these changes Mar 1, 2019
@tierninho
Copy link
Contributor

tierninho commented Mar 1, 2019

LGTM, however I spotted two issues:

  • the Push menu item is still active in the Repo menu, which triggers a console error:
    Uncaught (in promise) Error: The current repository is in a detached HEAD state
    image

  • Aside from above and while in this state, if you navigate to the Changes tab and uncheck the changes, the Continue rebase button is still active. I expect to be be disabled until the user checks the changed file(s).
    image

@shiftkey
Copy link
Member Author

shiftkey commented Mar 1, 2019

the Push menu item is still active in the Repo menu, which triggers a console error:
Uncaught (in promise) Error: The current repository is in a detached HEAD state

This is a good find. I assumed that the menu items were aware of a detached HEAD but I'll see if I can lock that down for 1.6.3.

  • Aside from above and while in this state, if you navigate to the Changes tab and uncheck the changes, the Continue rebase button is still active. I expect to be be disabled until the user checks the changed file(s).

This is an interesting point, and I've got some ideas to tackle this:

  • make the Continue Rebase button aware of the included files count
  • make the files which are part of the rebase checked and disable the checkbox, so the user cannot uncheck them while in the middle of a rebase

I favour the latter approach because the app should require the user to bring along all the files when continuing the rebase. @billygriffin any objections to figuring out how to achieve that within the Changes tab?

@tierninho
Copy link
Contributor

tierninho commented Mar 1, 2019

Make the files which are part of the rebase checked and disable the checkbox, so the user cannot uncheck them while in the middle of a rebase

I also favor the latter.

(strike previous comment)

@billygriffin
Copy link
Contributor

make the files which are part of the rebase checked and disable the checkbox, so the user cannot uncheck them while in the middle of a rebase

Makes sense to me, agreed! One question, I remember there was some goofiness in the merge conflicts flow around working directory changes being inadvertently committed as part of the conflict resolution process. Does that same concern exist in this flow or no?

@shiftkey
Copy link
Member Author

shiftkey commented Mar 4, 2019

@billygriffin

One question, I remember there was some goofiness in the merge conflicts flow around working directory changes being inadvertently committed as part of the conflict resolution process. Does that same concern exist in this flow or no?

Are you referring to untracked files and this issue #6411? If so, I have the same behaviour in place when continuing a rebase:

public async _continueRebase(
repository: Repository,
workingDirectory: WorkingDirectoryStatus
) {
const gitStore = this.gitStoreCache.get(repository)
const trackedFiles = workingDirectory.files.filter(f => {
return f.status.kind !== AppFileStatusKind.Untracked
})

For tracked changes, there's two different flows to consider:

  • continuing a rebase - if you make a change to another file as part of resolving conflicts, this will be included in the commit when continuing the rebase. This might be a bit confusing at first listen, but it's the same behaviour as when you rebase via the Git command line (it won't let you continue without staging all changes).

Happy to chat more about this if there's further questions. I've also opened #7006 to track what we should do with the checkboxes for changed files while in a rebase.

@outofambit
Copy link
Contributor

@shiftkey I believe @billygriffin is referring to #6349 (but correct me if i'm wrong)

@outofambit outofambit removed their assignment Mar 4, 2019
@billygriffin
Copy link
Contributor

Since #7005 and #7006 are now a thing, I think I'm comfortable with this.

@outofambit outofambit self-assigned this Mar 4, 2019
@outofambit outofambit merged commit bcb2fae into development Mar 4, 2019
@outofambit outofambit deleted the shiftkey/rebase/push-pull-description branch March 4, 2019 16:21
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.

5 participants