Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Given a Commit object, how do I find out if it is a merge or and ordinary commit ? #1200

Answered by Byron
nyue asked this question in Q&A
Discussion options

You must be logged in to vote

A commit that is a merge has more than one parents, as in len(commit.parents) > 1.

Replies: 1 comment

Comment options

A commit that is a merge has more than one parents, as in len(commit.parents) > 1.

You must be logged in to vote
0 replies
Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1199 on March 13, 2021 16:07.

AltStyle によって変換されたページ (->オリジナル) /