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.

Why are merges so different compared to commits?

See original GitHub issue

I tried doing a squash PR on a branch in my repo and then using auto-changelog’s generated JSON, I see that merges have:

  1. A severely limited amount of data compared to commits and is missing subject, breaking, hash, etc.
  2. A merge’s message is actually equivalent to a commit’s subject, which is extremely confusing.

Is there any reason why merges are handled differently than commits? The README says that it is better to “merge pull requests using the standard merge commit message for your platform” which sounds like a huge limitation on what this tool can do but I can’t see why a squash merge would be any different.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

cookpetecommented, Jun 21, 2019

Would it solve your problem to simply add a commit property to the merge object, which contains the entire merge commit data?

TimeDropsSBcommented, Jun 21, 2019

Yes, it would indeed solve it. I think objects in fixes do that already so if objects in merges each have the full commit too, that would be awesome and even better than my proposal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are merges so different compared to commits? · Issue #123
A commit is a merge when it has multiple parents; the commit message isn't needed. All reactions.
Read more >
What is the difference between a merge commit & a squash?
Merging makes it possible to reconcile each branch's differences with a shared branch, consolidating all of the work you and your team members...
Read more >
What is the purpose of a separate merge commit in git?
For a non-trivial merge it is clear to me that this is useful: It keeps the history of how things were merged separate...
Read more >
Merge requests sometimes choose wrong commit to diff and ...
The UI is showing a different diff when comparing the branches to merge than the git cli. I believe there is a similar...
Read more >
Understanding Git Merge - BiTE Interactive
Merge logic. Normally, a commit is something that you create, typically by editing files in the working tree, adding them to the index,...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found