Skip to content

If no default editor found, user cannot use Merge Conflicts #6060

Closed

Description

@tierninho

If no default editor found, Desktop prompts the user to download Atom, thus disrupting the Merge Conflict flow as other git actions need to be resolved before continuing with Merge Conflict

oct-31-2018 10-53-32
oct-31-2018 10-55-34

Alternatively, I have seen this error too:

error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

Reproduce:

  • Remove your editors, restart Desktop
  • Attempt a merge conflict, click open in editor button

Logs:

2018-10-31T17:50:55.535Z - info: [ui] launching: 1.5.0-beta2 (Mac OS 10.13.6)
2018-10-31T17:50:55.536Z - info: [ui] execPath: '/Applications/Beta Desktop.app/Contents/Frameworks/GitHub Desktop Helper.app/Contents/MacOS/GitHub Desktop Helper'
2018-10-31T17:51:25.404Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: PRlist - tierninho (has token)
2018-10-31T17:52:03.465Z - error: [ui] `git merge origin/ccc` exited with an unexpected code: 1.
Auto-merging .gitignore
CONFLICT (content): Merge conflict in .gitignore
Automatic merge failed; fix conflicts and then commit the result.

(The error was parsed as 7: We found some conflicts while trying to merge. Please resolve the conflicts and commit the changes.)
2018-10-31T17:52:12.709Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: PRlist - tierninho (has token)
2018-10-31T17:52:12.732Z - error: [ui] `git -c credential.helper= checkout --progress origin/ccc -b ccc --recurse-submodules --` exited with an unexpected code: 1.
.gitignore: needs merge

error: you need to resolve your current index first

2018-10-31T17:52:56.924Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: NEWtest - tierninho (has token)
2018-10-31T17:52:57.979Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune --recurse-submodules=on-demand origin (took 1.048s)
2018-10-31T17:52:58.377Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: asdasdasddsdss - tierninho (has token)
2018-10-31T17:52:59.937Z - info: [ui] Background fetch for 12 repositories took 4.745sec
2018-10-31T17:53:55.816Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: PRlist - tierninho (has token)
2018-10-31T17:53:55.837Z - error: [ui] `git -c credential.helper= checkout --progress origin/ccc -b ccc --recurse-submodules --` exited with an unexpected code: 1.
.gitignore: needs merge

error: you need to resolve your current index first

2018-10-31T17:54:46.240Z - error: [ui] `git merge origin/ccc` exited with an unexpected code: 128.
error: Your local changes to the following files would be overwritten by merge:
	.gitignore
Please commit your changes or stash them before you merge.
Aborting

tested in: 1.5.0-beta2, mac

Activity

  1. added
    bug
    priority-3
    on Oct 31, 2018
  2. shiftkey commented on Oct 31, 2018

    @shiftkey
    Member

    I want to make this a priority-2 because of how disruptive it can be - it makes you leave the new conflict resolution flow, and doesn't give the user a chance to recover.

    I'm going to try and size up the work required to make us more resilient here (timeboxed to a few hours today), in a couple of ways:

    • properly detect whether you have any suitable editor set
    • what we can do about the conflict resolution flow to indicate you don't have a suitable editor for us to launch
  3. tierninho commented on Oct 31, 2018

    @tierninho
    ContributorAuthor

    Easy way to trigger the following

    error: Merging is not possible because you have unmerged files.
    hint: Fix them up in the work tree, and then use 'git add/rm <file>'
    hint: as appropriate to mark resolution and make a commit.
    fatal: Exiting because of an unresolved conflict.
    

    is to open GitHub Desktop > Install Command line tool while Merge Conflict is open, then attempt to resolve the conflict again. Not a usual flow, but the output is the same.

  4. self-assigned this
    on Oct 31, 2018
  5. added
    priority-2
    and removed
    priority-3
    on Oct 31, 2018
  6. added this to the 1.5.0 milestone on Oct 31, 2018
  7. ampinsk commented on Oct 31, 2018

    @ampinsk
    Contributor

    We should at least jump back to the conflict resolution modal if they hit Close on the "Unable to open external editor" popup.

    I like giving people the prompt to download Atom, but maybe it would be safer to do something like disable the Open in Editor button with a tooltip No editor detected?

  8. removed their assignment
    on Nov 1, 2018
  9. shiftkey commented on Nov 1, 2018

    @shiftkey
    Member

    Dropping myself from this because #6063 has been more time-consuming than I'd planned

  10. self-assigned this
    on Nov 2, 2018
  11. billygriffin commented on Nov 5, 2018

    @billygriffin
    Contributor

    If there's no editor detected, their only other options are to either abort or open in command line?

    Separately, I'm wondering if 1.5.1 should contain metrics around % of people with a default editor and potentially which one so we can have some idea of impact for something like this?

  12. ampinsk commented on Nov 5, 2018

    @ampinsk
    Contributor

    Would it be possible to do something like Open in... and have them choose an application?

  13. shiftkey commented on Nov 6, 2018

    @shiftkey
    Member

    Would it be possible to do something like Open in... and have them choose an application?

    @ampinsk as a fallback we have the "Open in Default Program" context menu action in some areas, but I don't think it's ready to be relied on for our features for a couple of reasons:

  14. removed their assignment
    on Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority-2

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions