Homec4science

Detect changes in merge commits as the diff of the merge and the first parent

Authored by epriestley <git@epriestley.com> on Mar 22 2012, 01:10.

Description

Detect changes in merge commits as the diff of the merge and the first parent

Summary:
Currently, we use "git log" to detect the change list for all commits, but this produces no output for merge commits.

Instead, parse them as changes against the first parent (the merge destination). This produces generally sensible/expected behavior, and is consistent with what GitHub does.

We need to special-case the first commit because it doesn't have parents.

NOTE: This is a parser change so you need to run ./scripts/repository/reparse.php --all <callsign> --change to reparse merge commits in already-imported repositories after updating.

Test Plan: Reparsed a merge commit, a non-merge commit, and the first commit in the Phabricator repository.

Reviewers: btrahan, gschmidt

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T961

Differential Revision: https://secure.phabricator.com/D1985

Details

Committed
epriestley <git@epriestley.com>Mar 22 2012, 01:10
Pushed
aubortJan 31 2017, 17:16
Parents
rPH33bce2771830: Allow Maniphest reports to be sorted, filtered by project, and have adjustable…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH6d631577f23c: Detect changes in merge commits as the diff of the merge and the first parent (authored by epriestley <git@epriestley.com>).Mar 22 2012, 01:10