libgit2/libgit2 — pull request #2137 by jru (2014-02-24 21:23:37+00:00)
Title: Blame first-parent history

Allow blame to limit search for commits to only the first-parent history.

#### Motivation
A very common git workflow is to use topic branches for development, and merge them into an integration branch upon completion. These integration branches can again be merged into higher-level branches, in a hierarchical fashion (e.g. topic branches -> team stories -> features -> master)

Having the possibility to blame files at different levels of detail can be very useful for certain types of workflows, and it would not force people to squash-merge in order to obtain the same results (e.g. [here]
(https://github.com/reenhanced/gitreflow/issues/52))

#### Implementation
- New flag for blame options: GIT_BLAME_FIRST_PARENT
- If the flag is passed, the commit parent count is lowered to 1
- Blame example extended to use functionality
- Unit test added that expects the computed hunks to be part of the first-parent history