Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Git Diagnostics shows giant merge conflict message #1703

Open
@Arcanemagus

Description

@Arcanemagus

Prerequisites

Description

If you attempt to pull a repository that has local changes that would be overridden by the incoming commits (say, updates to a package-lock.json), you get an error message with the entire debug output. With Git Diagnostics enabled this includes far too much information to display directly.

Steps to Reproduce

  1. Checkout a repo (e.g. atom/atom@64fc36f)
  2. Make a local change (to package-lock.json)
  3. Enable "Git Diagnostics" in the settings
  4. Attempt to pull down changes from the remote repo.

Expected behavior:

The merge conflict to be caught and presented nicely to the user.

Note that if the Git Diagnostics option is disabled the standard git output looks decent enough:
image

Actual behavior:

A giant error box shows the entire verbose output of the git command:

Uncaught (in promise) GitError: git pull origin master in C:\temp\atom exited with code 1
stdout: Updating 64fc36f66..5e64cdcf1

stderr: 13:48:21.751414 exec_cmd.c:236          trace: resolved executable dir: C:/Users/abneyl/Documents/GitHub/github/node_modules/dugite/git/mingw64/bin
13:48:21.754414 git.c:344               trace: built-in: git pull origin master
13:48:21.763419 run-command.c:640       trace: run_command: git fetch --update-head-ok origin master
13:48:21.776417 exec_cmd.c:236          trace: resolved executable dir: C:/Users/abneyl/Documents/GitHub/github/node_modules/dugite/git/mingw64/bin
13:48:21.778418 git.c:344               trace: built-in: git fetch --update-head-ok origin master
13:48:21.810414 run-command.c:640       trace: run_command: git remote-https origin https://github.com/atom/atom.git
13:48:21.823434 exec_cmd.c:236          trace: resolved executable dir: C:/Users/abneyl/Documents/GitHub/github/node_modules/dugite/git/mingw64/bin
13:48:21.825433 git.c:576               trace: exec: git-remote-https origin https://github.com/atom/atom.git
13:48:21.825433 run-command.c:640       trace: run_command: git-remote-https origin https://github.com/atom/atom.git
13:48:21.842417 exec_cmd.c:236          trace: resolved executable dir: C:/Users/abneyl/Documents/GitHub/github/node_modules/dugite/git/mingw64/bin
13:48:21.849412 http.c:709              == Info: Couldn't find host github.com in the _netrc file; using defaults
13:48:21.855419 http.c:709              == Info:   Trying 192.30.255.112...
13:48:21.855419 http.c:709              == Info: TCP_NODELAY set
13:48:21.883414 http.c:709              == Info: Connected to github.com (192.30.255.112) port 443 (#0)
13:48:21.883414 http.c:709              == Info: schannel: SSL/TLS connection with github.com port 443 (step 1/3)
... several MiB (?) of output

image

Reproduces how often:

100% of the time.

Versions

An Atom build based on atom/atom@64fc36f, running github from 45b46f0.

Atom    : 1.33.0-dev-64fc36f66
Electron: 2.0.9
Chrome  : 61.0.3163.100
Node    : 8.9.3
apm  2.1.2
npm  6.2.0
node 8.9.3 x64
atom 1.33.0-dev-64fc36f66
python 2.7.15
git 2.19.0.windows.1
visual studio 2015

Additional Information

As this only shows when a diagnostic option is enabled, this is low priority at best 😉.

Metadata

Metadata

Assignees

No one assigned

    Labels

    papercutSmall-scope issues and bugs we can use to backfill our sprint plans

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions