summaryrefslogtreecommitdiff
path: root/src/blame_git.c
diff options
context:
space:
mode:
authorJuan Rubén <juanruben.segovia@gmail.com>2014-02-26 19:22:19 +0100
committerJuan Rubén <juanruben.segovia@gmail.com>2014-02-26 19:25:07 +0100
commit0276f0f55bf24dc5e0f49612106c1091381033f9 (patch)
tree39e072aaba7ba881dca8bdf14191c951a01d3e47 /src/blame_git.c
parent899bd19a62c10be929103542aabbf8585de8aecd (diff)
downloadlibgit2-0276f0f55bf24dc5e0f49612106c1091381033f9.tar.gz
Reset num_parents to 1 only for merge commits
Also, correct test case to account for the boundary flag
Diffstat (limited to 'src/blame_git.c')
-rw-r--r--src/blame_git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blame_git.c b/src/blame_git.c
index c275293c3..72afb852b 100644
--- a/src/blame_git.c
+++ b/src/blame_git.c
@@ -489,7 +489,7 @@ static void pass_blame(git_blame *blame, git_blame__origin *origin, uint32_t opt
if (!git_oid_cmp(git_commit_id(commit), &blame->options.oldest_commit))
/* Stop at oldest specified commit */
num_parents = 0;
- else if (opt & GIT_BLAME_FIRST_PARENT)
+ else if (opt & GIT_BLAME_FIRST_PARENT && num_parents > 1)
/* Limit search to the first parent */
num_parents = 1;