Skip to content

disable new branch for detached head#6994

Closed
tierninho wants to merge 1 commit intodisable-push-for-detached-headfrom
disable-new-branch-for-detached-head
Closed

disable new branch for detached head#6994
tierninho wants to merge 1 commit intodisable-push-for-detached-headfrom
disable-new-branch-for-detached-head

Conversation

@tierninho
Copy link
Contributor

@tierninho tierninho commented Mar 2, 2019

if rebase in progress, then New Branch menu option should be disabled as well to avoid confusion and error:

git -c credential.helper= -c protocol.version=2 checkout --progress cccc --recurse-submodules -- exited with an unexpected code: 1. 2-simple-rebase-conflict/LICENSE.md: needs merge, error: you need to resolve your current index first`

image

related to #6992 and #6984

Feel free to close or edit if needed.

if rebase in progress, then New Branch menu option should be disabled as well to avoid confusion and error: 

`git -c credential.helper= -c protocol.version=2 checkout --progress cccc --recurse-submodules --` exited with an unexpected code: 1. 2-simple-rebase-conflict/LICENSE.md: needs merge, error: you need to resolve your current index first`

related to #6992
shiftkey
shiftkey previously approved these changes Mar 2, 2019
@shiftkey shiftkey dismissed their stale review March 2, 2019 13:52

Pondering on this some more

menuStateBuilder.setEnabled(
'create-branch',
!tipStateIsUnknown && !branchIsUnborn
!tipStateIsUnknown && !branchIsUnborn && !onDetachedHead
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this is the complete fix because creating a branch from a detached HEAD is still a valid scenario. The issue description in #6335 shows the steps a user might do (requires terminal usage).

@shiftkey
Copy link
Member

shiftkey commented Mar 4, 2019

Closing in favour of #7005 which is a more targeted fix for this issue.

@shiftkey shiftkey closed this Mar 4, 2019
@shiftkey shiftkey deleted the disable-new-branch-for-detached-head branch March 4, 2019 13:15
@shiftkey shiftkey added this to the 1.6.3 milestone Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants