atom / github

:octocat: Git and GitHub integration for Atom
https://github.atom.io
MIT License
1.11k stars 393 forks source link

Uncaught (in promise) peg$SyntaxError {message: "Expected "@@ -" or "@@@ -" but end of input found." #1409

Open Ben3eeE opened 6 years ago

Ben3eeE commented 6 years ago

Prerequisites

Description

github resolve as theirs

Uncaught (in promise) peg$SyntaxError {message: "Expected "@@ -" or "@@@ -" but end of input found.", expected: Array(2), found: null, location: Object, name: "SyntaxError"…}expected: Array(2)found: nulllocation: Objectmessage: "Expected "@@ -" or "@@@ -" but end of input found."name: "SyntaxError"rawStack: Array(8)stack: "SyntaxError: Expected "@@ -" or "@@@ -" but end of input found.↵    at peg$buildStructuredError (C:\Users\bene\AppData\Local\atom\app-1.27.0-beta0\resources\app\node_modules\what-the-diff\lib\parser.js:381:18)↵    at Object.peg$parse [as parse] (C:\Users\bene\AppData\Local\atom\app-1.27.0-beta0\resources\app\node_modules\what-the-diff\lib\parser.js:1938:17)↵    at parse (C:\Users\bene\AppData\Local\atom\app-1.27.0-beta0\resources\app\node_modules\what-the-diff\index.js:5:25)↵    at C:\Users\bene\AppData\Local\atom\app-1.27.0-beta0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:714:49↵    at Generator.next (<anonymous>)↵    at step (C:\Users\bene\AppData\Local\atom\app-1.27.0-beta0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:104:197)↵    at C:\Users\bene\AppData\Local\atom\app-1.27.0-beta0\resources\app\node_modules\github\lib\git-shell-out-strategy.js:104:367↵    at <anonymous>"__proto__: Error
step @ <embedded>:186613
(anonymous) @ <embedded>:186613
00:59:40.062 <embedded>:186613 Uncaught (in promise) peg$SyntaxError {message: "Expected "@@ -" or "@@@ -" but end of input found.", expected: Array(2), found: null, location: Object, name: "SyntaxError"…}
step @ <embedded>:186613
(anonymous) @ <embedded>:186613

Steps to Reproduce

  1. Have the unstaged changes tab for a file open
  2. Undo discard in this file resulting in merge conflicts
  3. Merge with conflict markers
  4. In the Git tab right click and resolve as theirs

Expected behavior:

Resolving as theirs without error

Actual behavior:

Several errors repeated in the console

Reproduces how often:

100%

Versions

Atom : 1.27.0-beta0 Electron: 1.7.11 Chrome : 58.0.3029.110 Node : 7.9.0

smashwilson commented 6 years ago

I'm having trouble reproducing this on master or 0.14-releases. Maybe it has something to do with the nature of the actual patch?

Ben3eeE commented 6 years ago

Hmm. I had it reproduce for several different small patches. I'll poke at it again to see if I can narrow it down further and provide more detailed steps :sparkles:

Edit: Seems to only reproduce if the unstaged changes tab for the file is open. Updated the steps in the body of the issue.