You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the git log terminal command on that same directory, I get the list as follows:
However, the list of commits returned by the simple-git call in my code above returns the following list of commits, with the latest commit with message "Merge branch 'thomastang/pushmodel' ... " not being present:
The git.log().latest field also improperly has the value of the second to latest commit, with the message "empty commit".
My guess is that Simple-Git's git.log() call for some reason does not include commits that are from merges. I was wondering if my assumption is correct, and if there is a way to retrieve commit logs including commits from merges using Simple-Git?
The text was updated successfully, but these errors were encountered:
There's no obvious reason for merge commits not showing up - so if you didn't find a cause for this please can you run the script with verbose logging enabled.
The verbose logs show the command that simple-git passed into git, along with all the data that was received. Does manually running the command simple-git generates also miss the merge commit?
This issue has been automatically closed due to a lack of response. If your problem persists please open a new issue including any additional detail requested from this issue. For more detail on the issues/pull requests see ISSUES_AND_PULL_REQUESTS
This seems to be related to the --first-parent argument.
When you use --first-parent, git log follows only the first parent of a merge commit. This effectively gives you a "linear" view of the branch's history, showing only the commits that were directly made onto that branch, and skipping the detailed history of merged feature branches.
I am using the simple-git's git.log() call to retrieve the latest commit on a particular directory.
My code is as follows:
When I run the git log terminal command on that same directory, I get the list as follows:
However, the list of commits returned by the simple-git call in my code above returns the following list of commits, with the latest commit with message "Merge branch 'thomastang/pushmodel' ... " not being present:

The git.log().latest field also improperly has the value of the second to latest commit, with the message "empty commit".
My guess is that Simple-Git's git.log() call for some reason does not include commits that are from merges. I was wondering if my assumption is correct, and if there is a way to retrieve commit logs including commits from merges using Simple-Git?
The text was updated successfully, but these errors were encountered: