question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`danger local` git diff error

See original GitHub issue

Hi,

When running danger local --dangerfile dangerfile.js I am getting:

Could not get diff from git between master and HEAD
{ Error: stdout maxBuffer exceeded
    at Socket.onChildStdout (child_process.js:325:14)
    at Socket.emit (events.js:160:13)
    at addChunk (_stream_readable.js:269:12)
    at readableAddChunk (_stream_readable.js:252:13)
    at Socket.Readable.push (_stream_readable.js:213:10)
    at Pipe.onread (net.js:599:20) cmd: 'git diff master...HEAD' }

For branch structure:

master -> develop -> build/danger

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:19 (14 by maintainers)

github_iconTop GitHub Comments

8reactions
rohit-gohricommented, Jul 11, 2019

Then yeah, that’s what you’ll need to set up - master in that repo needs to represent the before, and the current branch as the merged master

Yeah, just did that. Fetching itself didn’t create a local ref for master. Needed to run: git fetch origin master:master. That :master sets the local ref.

2reactions
rohit-gohricommented, Aug 20, 2022

However, we are using develop branch as the primary branch, not master. Does anyone know how to resolve the issue?

There is a --base option for danger local. You can use that to provide the base branch

Read more comments on GitHub >

github_iconTop Results From Across the Web

Github Actions Error; cannot see git diff to Master
I wrote a bash script that runs fine locally, but breaks in Github Actions. Expected Outcome: lint only markdown files that have been...
Read more >
git-config Documentation - Git
When writing, the new value is written to the repository local configuration file by default, ... This command will fail with non-zero status...
Read more >
Danger failed: Invalid `Dangerfile` file (#227814) - GitLab.org
Something went wrong while fetching related merge requests.
Read more >
Git Reset | Atlassian Git Tutorial
Git reset is a powerful command that is used to undo local changes to the state of a Git ... This is the...
Read more >
Pull request diff - show actual diff instead of commit changes
Most importantly, the way DevOps Pull Request shows diff is different then if using local git (no matter the tool), there actual changs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found